Alexandre Julliard : winex11: Add handling of take focus event on the desktop window.
Alexandre Julliard
julliard at winehq.org
Mon Aug 17 11:24:38 CDT 2009
Module: wine
Branch: master
Commit: 12d1ff8ef6c34533a20008f4cfeb73ee4c601a5d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=12d1ff8ef6c34533a20008f4cfeb73ee4c601a5d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Aug 17 16:32:45 2009 +0200
winex11: Add handling of take focus event on the desktop window.
---
dlls/winex11.drv/event.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index c746546..9a489cd 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 );
More information about the wine-cvs
mailing list