godotengine / godotengine/godot
Custom cursors don't scale the same as ui elements, when monitors are scaled
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in: 4.0.stable, 4.3.stable, 4.4.dev2
### System information
Godot v4.3.stable (77dcf97d8) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6650 XT (Advanced Micro Devices, Inc.; 32.0.11021.1011) - AMD Ryzen 5 2600X Six-Core Processor (12 Threads)
### Issue description
When using monitors with different scaling, custom mouse cursor images aren't scaled.
UI elements work fine and will correctly update when changing a monitor's scaling percent.
### Steps to reproduce
1. Set a custom cursor, `Input.set_custom_mouse_cursor(CUSTOM_CURSOR)`
2. Run project
3. Move game window between monitors of different scales.
3b. You can also change the scale of the monitor the game window is currently on.

### Minimal reproduction project (MRP)
[Custom Cursor Scaling.zip](https://github.com/user-attachments/files/17107289/Custom.Cursor.Scaling.zip)
Cursor size should match the color rect.
Expected (100% scale):

Actual (150% scale):

Contributor guide
Research direction
Start with the linked minimal reproduction project and reproduce the custom cursor mismatch by moving the game window between monitors with different scaling, or changing the active monitor's scale. Trace the custom cursor and monitor-scaling handling in the desktop windowing code. Done means the cursor size matches the color rectangle at both 100% and 150% scaling and updates when the window moves.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100