winex11: Add handling of take focus event on the desktop window.

This commit is contained in:
Alexandre Julliard 2009-08-17 16:32:45 +02:00
parent f08747cbfc
commit 12d1ff8ef6
1 changed files with 8 additions and 0 deletions

View File

@ -566,6 +566,14 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
return; 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 */ /* try to find some other window to give the focus to */
hwnd = GetFocus(); hwnd = GetFocus();
if (hwnd) hwnd = GetAncestor( hwnd, GA_ROOT ); if (hwnd) hwnd = GetAncestor( hwnd, GA_ROOT );