On Wed Nov 5 10:36:06 2025 +0000, Loïc Rebmeister wrote:
I found an edge case to this MR, I'll give out an example with slightly exaggerated numbers and ignoring DPI to show what it does. For a **Monitor A** of **10x10px** size and a **Monitor B** of **100x100px** size, if we get a **Wine window** to be of size **50x50px** on Monitor B, everything works as usual. But then Wine window can be moved in such a way where it covers the entirety of **Monitor A** (Covering 10x10px for **100pixels** in total) and a large portion of **Monitor B** (Covering 50x10px for **500pixels**) This will make `get_monitor_from_rect` (That is called by `monitor_info_from_rect`) return monitor B as it covers 500pixels which is more than the 100pixels of monitor A, and as the monitor B isn't fully covered it will make `is_fullscreen` return false. The only way for it to not cause issues would be for `get_monitor_from_rect` to act the exact same way the WMs does to pick a screen, which is not feasible as WMs may use different way to pick a window. While I don't think it should change the MR in any way, I thought it deserved a comment, I'm not sure there is a way to do better without active support from the WM/compositor. This isn't related to the MR here and the issue is preexisting. I have a patch for this in Proton that takes the monitor pixel density into account.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9270#note_120830