godotengine / godotengine/godot
"DisplayServer.window_set_mouse_passthrough" causes flickering around polygon border
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in: 4.3.stable, 4.2.stable, 4.4.dev2 [[97ef3c8]](https://github.com/godotengine/godot/commit/97ef3c837263099faf02d8ebafd6c77c94d2aaba) with Compatibility renderer
### System information
Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - GeForce GTX 1060 - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)
### Issue description
https://github.com/user-attachments/assets/2f9acf0a-c61e-41a9-808d-00f779bfc0fa
When using window_set_mouse_passthrough and updating the clickable polygon area (e.g. when the player drags a desktop pet around on their screen), it causes clipping around the borders of the polygon area.
Similar issue to [#80098](https://github.com/godotengine/godot/issues/80098#issue-1830205875), except I get clipping around the borders of the polygon instead of whole screen flickering.
### Steps to reproduce
Run the minimal reproduction project and drag the test object around at a relatively fast pace.
The clipping does not happen if ```DisplayServer.window_set_mouse_passthrough(passthrough_polygon)``` (line 25 of Scenes/pet.gd) is commented out.
### Minimal reproduction project (MRP)
[test_window_set_mouse_passthrough_clipping.zip](https://github.com/user-attachments/files/17111759/test_window_set_mouse_passthrough_clipping.zip)
Contributor guide
Research direction
Start with the minimal reproduction project and Scenes/pet.gd, especially line 25 where DisplayServer.window_set_mouse_passthrough is updated. Compare dragging with that call enabled and commented out, then trace the Windows Compatibility-renderer display-server path. Done means rapidly dragging the object no longer causes clipping or flickering around the polygon border.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, godot
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100