Update wine to 1.2.
[sugaredwine.git] / patches / 0004-winex11-ignore-WM_TAKE_FOCUS-requests-for-desktop-w.patch
blobcd987e62b677d992185ecd69978cca5345d4a1ac
1 From 17f105ea1c18135accb38ea27f69da2b7535a04a Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Thu, 25 Sep 2008 13:27:30 -0500
4 Subject: [PATCH] winex11: ignore WM_TAKE_FOCUS requests for desktop windows
6 ---
7 dlls/winex11.drv/event.c | 9 +++++++++
8 1 files changed, 9 insertions(+), 0 deletions(-)
10 diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
11 index 014eb5e..63b6bae 100644
12 --- a/dlls/winex11.drv/event.c
13 +++ b/dlls/winex11.drv/event.c
14 @@ -568,6 +568,15 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
15 hwnd, IsWindowEnabled(hwnd), IsWindowVisible(hwnd), GetWindowLongW(hwnd, GWL_STYLE),
16 GetFocus(), GetActiveWindow(), GetForegroundWindow(), last_focus );
18 + if (hwnd == GetDesktopWindow())
19 + {
20 + /* Because the thread controlling the desktop window also has other
21 + windows (the taskbar), and we don't want them to steal the focus
22 + from real applications, we ignore WM_TAKE_FOCUS in this case. */
23 + TRACE( "ignoring take focus message for desktop window\n" );
24 + return;
25 + }
27 if (can_activate_window(hwnd))
29 /* simulate a mouse click on the caption to find out
30 --
31 1.5.6.5