https://bugs.winehq.org/show_bug.cgi?id=52532
Bug ID: 52532 Summary: SDL 2.0.20 doesn't restore fullscreen mode when restoring a window Product: Wine Version: 7.1 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@winehq.org Reporter: madewokherd@gmail.com Distribution: ---
Same testcase as bug 52519.
SDL will, in some cases, minimize fullscreen windows when they are deactivated. If this happens in SDL 2.0.20, the window will not be fullscreen when it is restored.
To reproduce the bug: * Run the test program in Wine with SDL_EVENT_LOGGING=1 * Click the window to fullscreen it. * Alt+tab to another window. * Restore the test program's window. * It appears with a windowed size rather than fullscreen.
Based on logs, I believe that SDL is requesting a fullscreen size and position, but Wine never requests NET_WM_STATE_FULLSCREEN. I'm not sure why.
https://bugs.winehq.org/show_bug.cgi?id=52532
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase CC| |madewokherd@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- Created attachment 71833 --> https://bugs.winehq.org/attachment.cgi?id=71833 test case (C source)
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- Created attachment 71834 --> https://bugs.winehq.org/attachment.cgi?id=71834 test case (exe)
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- Bug also filed with SDL, even though I believe Wine is at fault.
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- https://github.com/libsdl-org/SDL/issues/5320
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- It looks like we do not call sync_window_position from X11DRV_WindowPosChanged because we are processing an event (the WM_STATE client message which tells us the window is restored) when SDL makes the request to fullscreen the window. And then we get a ConfigureNotify with the old size from the WM so the window's fullscreen geometry is clobbered.
Maybe we should still call update_net_wm_states even if events are pending?
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #6 from Esme Povirk madewokherd@gmail.com --- Maybe there should be a special case for fullscreen in X11DRV_WindowPosChanged similar to what we have for minimization?
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #7 from Esme Povirk madewokherd@gmail.com --- Patch sent along those lines: https://www.winehq.org/pipermail/wine-devel/2022-February/207184.html
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #8 from Esme Povirk madewokherd@gmail.com --- Updated patch to fix flag handling: https://www.winehq.org/pipermail/wine-devel/2022-February/208566.html
https://bugs.winehq.org/show_bug.cgi?id=52532
--- Comment #9 from Esme Povirk madewokherd@gmail.com --- SDL has committed a work-around: https://github.com/libsdl-org/SDL/commit/268c2fa882559dd4e0fa09cad91e4a286e7...
So the only affected versions should be SDL 2.0.18 and 2.0.20.