Why is my cursor invisible in fullscreen?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Birdwards

I’m just getting started with Godot and want to make sure there isn’t some important setting I’m missing before I file a bug report. I’m making a 2D game, and when my project is set to fullscreen mode, neither the system cursor nor a custom cursor set in the Project Settings will show up. However, if I set the project to windowed mode without changing any other settings, both types of cursor work as expected. I’m using Godot 3.1.2 on 64-bit Windows 10. I tried both GLES3 and GLES2, and the problem happens in both rendering engines. I checked Input.get_mouse_mode(), and it is already set to MOUSE_MODE_VISIBLE at all times. Is there any setting I don’t know about to ensure that the mouse’s visibility survives the transition to fullscreen?

I’m not able to reproduce this in 3.1.2 64-bit Windows 10. Are you having the problem in 3.1.1? Can you share your project?

avencherus | 2019-12-08 08:48

Apologies for taking so long to respond. I believe I’ve solved it (see below), but to answer your question: I haven’t used 3.1.1, but I had the same problem in 3.1.0, even on a blank project. Updating to 3.1.2 was one of the steps I took while attempting to fix it.

Birdwards | 2019-12-23 01:31

:bust_in_silhouette: Reply From: chima

Hi, i have the same problem, the cursor does not appear if the game is in fullscreen and it has the focus.
If I click on another application which is on my other screen (i have 2 screens), and I move my mouse towards the window of my game without click, the cursor appears.
If i click on my game and give it the focus, the cursor disappears again.
I confirm in windowed mode the problem does not exist.

The code

extends Control

# variables
var cursor_custom = load("res://images/cursor.png")

# Called when the node enters the scene tree for the first time
func _ready():
	# Set a Custom cursor

Project parameters
Display-> Window fullscreen checked, stretch in viewport, keep, 1

Windows 10, 2 screens

:bust_in_silhouette: Reply From: besttutors

I just fixed this. Go to your windows mouse settings, then pointer… then clear all boxes. Uncheck all until the mouse cursor is stock.

:bust_in_silhouette: Reply From: chima

It doesn’t work for me
Even if I just put a custom image in the parameters of the project (without scripts), that does not work. Just uncheck full screen and it works, it’s not a normal behavior.

:bust_in_silhouette: Reply From: Birdwards

I think I figured it out! I have f.lux installed, which tints the entire screen to reduce the amount of blue light it emits at night. The method that f.lux uses to tint the screen doesn’t affect the mouse cursor, so the cursor looks brighter and slightly bluer than everything else on the screen- it can be pretty annoying.

In the settings for f.lux, there is an option to fix this problem labeled “Software mouse cursor when needed (fixes ‘white cursor’)”. I assume that this option is implemented by hiding the system cursor and replacing it with a lookalike “cursor” controlled by f.lux that can be properly rendered behind the tint layer, rather than on top of it.

I’m guessing that f.lux’s software cursor renders behind Godot’s fullscreen layer. Disabling the software cursor allows both the system cursor and custom cursors to be visible in fullscreen Godot projects, though sadly, neither are affected by f.lux’s tint.

This seems likely to be an edge case that the devs just haven’t considered before, but just in case: are there any Windows users who have f.lux installed, and can see the cursor in fullscreen even when the software cursor is enabled and the screen is tinted? If not, I guess it would be best for me to submit compatibility with the f.lux software cursor as a feature request, rather than a bug report.

I know this is a bit of an old question, but I test f.lux with the latest version of Godot 3.2.1, and with colors set to warm and the cursor set to software, it worked fine with the cursor displaying like it should.

What I did find though was that if you enable “Display pointer trails” in the mouse settings in Windows 10, the cursor vanishes in any fullscreen game. I’ve added a ticket for it here.

Why anyone would want to enable pointer trails to begin with is beyond me, as it’s just super annoying, but I guess we can’t control what the people do with their Windows settings. :slight_smile:

Ragnar Brynjúlfsson | 2020-07-09 11:15

:bust_in_silhouette: Reply From: JohnMclaughlin

Maybe it’s too late to answer but anyway maybe it would help anybody who has the same problem. In my case, I had Windows magnifier turned on which killed mouse visibility in fullscreen mode in Godot. So, check it out.