[PATCH 0/1] MR8108: winex11: Focus the desktop window when _NET_ACTIVE_WINDOW is None.
XWayland changes _NET_ACTIVE_WINDOW to None when focus switches to a Wayland window. This makes sure app window is deactivated in that case too and not just when focus changes to another X11 window. _NET_ACTIVE_WINDOW also changes None when alt-tab is initiated, but there's no easy way to tell the difference, so this will also trigger a focus loss as soon as alt-tab is initiated, while we were previously waiting for it to actually complete to make changes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8108
From: Rémi Bernon <rbernon(a)codeweavers.com> XWayland changes _NET_ACTIVE_WINDOW to None when focus switches to a Wayland window. This makes sure app window is deactivated in that case too and not just when focus changes to another X11 window. _NET_ACTIVE_WINDOW also changes None when alt-tab is initiated, but there's no easy way to tell the difference, so this will also trigger a focus loss as soon as alt-tab is initiated, while we were previously waiting for it to actually complete to make changes. --- dlls/winex11.drv/window.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 7fd1151bdff..e85644ff2da 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -354,8 +354,7 @@ static HWND hwnd_from_window( Display *display, Window window ) HWND *list; UINT i; - if (!window) return 0; - if (window == root_window) return desktop; + if (!window || window == root_window) return desktop; if (!XFindContext( display, window, winContext, (char **)&hwnd )) return hwnd; if (!(list = build_hwnd_list())) return desktop; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8108
participants (1)
-
Rémi Bernon