[Bug 48121] Unity games do not fire OnApplicationFocus/OnApplicationPause events on focus regain

WineHQ Bugzilla wine-bugs at winehq.org
Wed Sep 16 00:58:36 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48121

--- Comment #8 from w at zeroitlab.com ---
On a second look fixing the issue might be a bit more complicated. Looking a
bit further into the behavior of clicking on the caption on wine, wine with
virtual desktop, and windows, the behavior is the following:

- Wine on X11: window receives a WM_MOUSEACTIVATE on a HTMENU (regardless if it
actually has any menus or not), then depending on the reply it activates the
window
- Windows and Wine with virtual desktop: window receives a WM_MOUSEACTIVATE on
a HTCAPTION, ignores the window's wish to not be activated and activates it
anyways, then later the window receives a WM_NCLBUTTONDOWN. This makes Unity
work.

There are two okay-ish ways to fix this:
- Make the X11 implementation either not test anything, or test HTCAPTION and
ignore result and send a WM_NCLBUTTONDOWN after.
- Send a WM_NCLBUTTONDOWN after testing for HTMENU. This is somewhat a band-aid
fix since the program will still receive a WM_MOUSEACTIVATE with HTMENU even if
it has no menus at all, however we can keep the current activation behavior.

-- 
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.



More information about the wine-bugs mailing list