[Bug 52519] New: SDL 2.0.20 reports wrong FOCUS_GAINED event when minimizing an inactive fullscreen window
https://bugs.winehq.org/show_bug.cgi?id=52519 Bug ID: 52519 Summary: SDL 2.0.20 reports wrong FOCUS_GAINED event when minimizing an inactive fullscreen window Product: Wine Version: 7.1 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: madewokherd(a)gmail.com Distribution: --- Created attachment 71817 --> https://bugs.winehq.org/attachment.cgi?id=71817 test case (C source) SDL will, in some cases, minimize fullscreen windows when they are deactivated. If this happens in SDL 2.0.20, it will report a FOCUS_LOST event followed by a FOCUS_GAINED event. It should only report the FOCUS_GAINED event when the window is restored, which is what happens on Windows. Also reported here: https://github.com/libsdl-org/SDL/issues/5316 Test program attached. This requires SDL. 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. * The last focus event logged was FOCUS_GAINED. I know this happens because SDL receives a WM_ACTIVATE message indicating that the window is minimized, but GetForegroundWindow reports that the application is still in the foreground. SDL responds to WM_ACTIVATE by "resyncing" focus, so it responds to this by reporting FOCUS_GAINED. I haven't been able to figure out the exact set of circumstances that cause this behavior in Wine, so I couldn't make a test case that doesn't require SDL. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=52519 --- Comment #1 from Esme Povirk <madewokherd(a)gmail.com> --- Created attachment 71818 --> https://bugs.winehq.org/attachment.cgi?id=71818 test case (exe) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=52519 Esme Povirk <madewokherd(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd(a)gmail.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=52519 Esme Povirk <madewokherd(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase -- 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.
https://bugs.winehq.org/show_bug.cgi?id=52519 --- Comment #2 from Esme Povirk <madewokherd(a)gmail.com> --- SDL has committed a work-around: https://github.com/libsdl-org/SDL/commit/def27267b5d0b286a19acb882ee2fde25cc... So the only affected versions of SDL should be 2.0.18 and 2.0.20. -- 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.
participants (1)
-
WineHQ Bugzilla