From: Roberto Fernandez rfz@free.fr
Fixes the longstanding misbehavior of X window managers with respect to Delphi based applications.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26503 --- dlls/winex11.drv/event.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 86edf66b820..3efeb8fcdb4 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -731,7 +731,16 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) if (hwnd) hwnd = NtUserGetAncestor( hwnd, GA_ROOT ); if (!hwnd) hwnd = get_active_window(); if (!hwnd) hwnd = last_focus; - if (hwnd && can_activate_window(hwnd)) set_focus( event->display, hwnd, event_time ); + if (hwnd && can_activate_window(hwnd)) + { + Window win = X11DRV_get_whole_window(hwnd); + if (win) + { + TRACE("will raise window %p", hwnd); + XRaiseWindow(event->display, win); + } + set_focus( event->display, hwnd, event_time ); + } } else if (protocol == x11drv_atom(_NET_WM_PING)) {