+2 votes

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?

asked Dec 8, 2019 in Engine by Birdwards (21 points)

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?

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.

4 Answers

0 votes
Best answer

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.

answered Dec 23, 2019 by Birdwards (21 points)
selected Dec 23, 2019 by Birdwards
0 votes

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
    Input.set_custom_mouse_cursor(cursor_custom)
    pass

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

Environment
Windows 10, 2 screens

answered Dec 19, 2019 by chima (18 points)
0 votes

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

answered Dec 19, 2019 by besttutors (14 points)
0 votes

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.

answered Dec 19, 2019 by chima (18 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.