From 12d1ff8ef6c34533a20008f4cfeb73ee4c601a5d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 17 Aug 2009 16:32:45 +0200 Subject: [PATCH] winex11: Add handling of take focus event on the desktop window. --- 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 c746546f71b..9a489cd2980 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -566,6 +566,14 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) return; } } + else if (hwnd == GetDesktopWindow()) + { + hwnd = GetForegroundWindow(); + if (!hwnd) hwnd = last_focus; + if (!hwnd) hwnd = GetDesktopWindow(); + set_focus( event->display, hwnd, event_time ); + return; + } /* try to find some other window to give the focus to */ hwnd = GetFocus(); if (hwnd) hwnd = GetAncestor( hwnd, GA_ROOT );