http://bugs.winehq.org/show_bug.cgi?id=59180 Alexis Murzeau <amubtdx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amubtdx@gmail.com --- Comment #1 from Alexis Murzeau <amubtdx@gmail.com> --- Hi, I also have the same issue using fresh Wine prefix since wine version 10.19 (which introduced commit 3bea06b80dd21d6ceb6afd44d25dc5d3fde4ff5c). Reproducible in many games when the game resolution is not the native display resolution, including Fable The Lost Chapters, Trackmania Nation Forever, GTA San Andreas, Thief 2, ... I've tried to revert 3bea06b80dd21d6ceb6afd44d25dc5d3fde4ff5c and it fixes the issue for me too. The issue is caused by the removal of this code in xinerama_get_fullscreen_monitors: ``` if (nb_monitors == 1) { memset( indices, 0, sizeof(*indices) * 4 ); *generation = xinerama_generation; goto done; } ``` When changing resolution and without this special condition, xinerama_get_fullscreen_monitors returns -1 with indices set to -1. Previously, with a single monitor (which is my case), indices were set to 0. This issue doesn't seem to be related to window_update_client_config has whether the indices returned are 0 or -1, they are the same before and after the offending commit, which doesn't change resulting behavior of window_update_client_config. But xinerama_get_fullscreen_monitors is also called elsewhere, by the function update_net_wm_fullscreen_monitors. When using WINEDEBUG=x11drv, with additional logs in xinerama_get_fullscreen_monitors and with the commit applied, I get this when the game changes the screen resolution while going fullscreen: ``` 0130:trace:x11drv:X11DRV_WindowPosChanging hwnd 0x7006e, swp_flags 0x181f, shaped 0, rects { window (0,0)-(1024,768), client (0,0)-(1024,768), visible (0,0)-(1024,768) } 0130:trace:x11drv:X11DRV_WindowPosChanged win 0x7006e/6a0001f new_rects { window (0,0)-(1024,768), client (0,0)-(1024,768), visible (0,0)-(1024,768) } style 14000000 flags 8000181f xinerama_get_fullscreen_monitors: window_rect: 0, 0, 1024, 768, nb_monitors: 1 xinerama_get_fullscreen_monitors: window_rect NOT inside monitor_rect 0: 0, 0, 1920, 1080 xinerama_get_fullscreen_monitors: resulting indices: -1, -1, -1, -1, ret = 0 0130:trace:x11drv:update_net_wm_fullscreen_monitors window 0x7006e/6a0001f, requesting _NET_WM_FULLSCREEN_MONITORS -1,-1,-1,-1 serial 1051 ``` I guess _NET_WM_FULLSCREEN_MONITORS with monitor -1 is causing the issue. Inside update_net_wm_fullscreen_monitors, overwriting the indices returned by xinerama_get_fullscreen_monitors to 0 instead of -1 makes the game window to be displayed and everything works. I've tried a patch that instead of reverting commit 3bea06b80dd21d6ceb6afd44d25dc5d3fde4ff5c, adds a call to query_screens() in xinerama_get_fullscreen_monitors. This fixes the issue as the monitor resolution is properly updated to the new resolution and now match the window size which makes xinerama_get_fullscreen_monitors returns indices set to 0 again. I'm not sure this is the way to go, this might cause performance regression, or maybe it is already expected that monitors resolution should be updated. I will attach a log output of xrandr, event, x11drv and additional custom logs that will contains related logs. Additional software and hardware information: Operating System: Debian GNU/Linux 13 KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.20.0 Qt Version: 6.9.2 Kernel Version: 6.17.13+deb14-amd64 (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 9800X3D 8-Core Processor Memory: 32 Gio of RAM (30.5 Gio usable) Graphics Processor 1: AMD Radeon RX 9070 XT Graphics Processor 2: AMD Ryzen 7 9800X3D 8-Core Processor -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.