Module: wine
Branch: master
Commit: 76bbf106a28c4caa82873e8450bde7d4adc765bf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=76bbf106a28c4caa82873e845…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Thu Apr 25 09:59:42 2013 +0200
winex11: Move the desktop process check from X11DRV_ClipCursor() to grab_clipping_window().
We don't want to clip in the desktop process, but we still need it to call
ungrab_clipping_window() if the process that was previously clipping didn't.
This can happen for example when fullscreen clipping is enabled, but the
corresponding window isn't explicitly destroyed before process exit.
---
dlls/winex11.drv/mouse.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index de6672e..168914f 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -362,6 +362,9 @@ static BOOL grab_clipping_window( const RECT *clip )
Window clip_window;
HWND msg_hwnd = 0;
+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
+ return TRUE; /* don't clip in the desktop process */
+
if (!data) return FALSE;
if (!(clip_window = init_clip_window())) return TRUE;
@@ -1378,9 +1381,6 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
{
if (!clip) clip = &virtual_screen_rect;
- if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
- return TRUE; /* don't clip in the desktop process */
-
if (grab_pointer)
{
HWND foreground = GetForegroundWindow();