This should at least fix foreground window inconsistencies between Wine and X11, when _NET_ACTIVE_WINDOW is supported by the WM, allowing us to then better implement focus tracking (to avoid changing focus when not desired), as well as SWP_NOACTIVATE.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7367
This implements better active window synchronization between Wine and X11 by requesting _NET_ACTIVE_WINDOW change whenever the Win32 active window changes, using source = 2 (pager) which is more often obeyed than other source values by the window managers.
This also implements SWP_NOACTIVATE properly by setting _NET_WM_USER_TIME time to 0 before mapping a window, which has the correct semantics, while later sending _NET_ACTIVE_WINDOW to activate it if it ends up being necessary to match the Win32 logic.
--
v2: winex11: Use _NET_ACTIVE_WINDOW to request/track window activation.
win32u: Call ActivateWindow callback when foreground window changes.
win32u: Return foreground window changes from GetWindowStateUpdates.
winex11: Refactor X11DRV_GetWindowStateUpdates control flow.
winex11: Keep track of whether mapped window needs activation.
winex11: Only set focus_time_prop for managed windows.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7699
This implements better active window synchronization between Wine and X11 by requesting _NET_ACTIVE_WINDOW change whenever the Win32 active window changes, using source = 2 (pager) which is more often obeyed than other source values by the window managers.
This also implements SWP_NOACTIVATE properly by setting _NET_WM_USER_TIME time to 0 before mapping a window, which has the correct semantics, while later sending _NET_ACTIVE_WINDOW to activate it if it ends up being necessary to match the Win32 logic.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7699
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56377
This patch makes msedge work in win10 mode, albeit I still have to add "--no-sandbox".
Without "--no-sandbox" it doesn't crash anymore with this patch,but I cannot browse webpages, it just looks as if it is unconnected.
--
v3: powrprof: Add stub for PowerRegisterForEffectivePowerModeNotifications.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7697