[PATCH 0/1] MR1859: winex11: Raise owned windows before setting input focus.
Installers based on InnoSetup use invisible window owning the main installer window. When focus is given to the installer window popup, window managers sometimes do not raise it as their owner is invisible and it stays below other windows unless they are minimized. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49933 This is not a regression and it is arguably perhaps a window manager bug, but it is also extremely annoying for users as installer windows tend to disappear from the pager, as well as missing from the window selector and below all other windows. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1859
From: Rémi Bernon <rbernon(a)codeweavers.com> Installers based on InnoSetup use invisible window owning the main installer window. When focus is given to the installer window popup, window managers sometimes do not raise it as their owner is invisible and it stays below other windows unless they are minimized. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49933 --- dlls/winex11.drv/event.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 86edf66b820..57ee5605b1f 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -607,6 +607,14 @@ static void set_focus( Display *display, HWND hwnd, Time time ) if (win) { + DWORD exstyle = NtUserGetWindowLongW( focus, GWL_EXSTYLE ); + + /* Some window managers do not raise owned windows if their owner is invisible, + * this is the case with Inno Setup based installers, so make sure it's raised. + */ + if (!(exstyle & WS_EX_APPWINDOW) && NtUserGetWindowRelative( focus, GW_OWNER )) + XRaiseWindow( display, win ); + TRACE( "setting focus to %p (%lx) time=%ld\n", focus, win, time ); XSetInputFocus( display, win, RevertToParent, time ); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1859
This merge request was closed by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1859
participants (1)
-
Rémi Bernon