godot
godot copied to clipboard
Cursor shows briefly when capturing mouse
Tested versions
Reproducible in 4.3, 4.0, 3.5.2
System information
Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6081) - Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 Threads)
Issue description
When setting mouse mode to captured, the cursor can be briefly seen at the center of the window.
- It doesn't seem to matter when mouse mode is changed (_init, _ready, process).
- Happens more consistently when cursor is outside the window, but still very often when inside.
- Setting mouse mode to hidden before setting it to captured seems to fix it for when the mouse is inside the window, but not when outside
Steps to reproduce
- Run minimal reproduction project
- Place cursor either inside or outside window, but away from the center
- Press ui_left to capture mouse
- See that the cursor briefly shows at the center of the window
Minimal reproduction project (MRP)
Is this really a bug or a general limitation? Judging by the tested versions, it seems to be very long-standing. How do other OSes handle this, I wonder? Could use some testing.
It's not doing this on macOS. Seem like it's caused the order of operations, in case of Windows it's setting position and capture before hiding cursor.