wine: rearrange patches to a more sensible order
[sugaredwine.git] / patches / 0004-winex11-ignore-WM_TAKE_FOCUS-requests-for-desktop-w.patch
blob5f6e29e6b8cbbea6bba188fadf1618d63d000019
1 From 795dd483769351a5b095b6cfd689a8dcb433a943 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 d1a48e1..d5dcb65 100644
12 --- a/dlls/winex11.drv/event.c
13 +++ b/dlls/winex11.drv/event.c
14 @@ -552,6 +552,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