[PATCH 1/5] winex11: Move the desktop process check from X11DRV_ClipCursor() to grab_clipping_window().

Henri Verbeet hverbeet at codeweavers.com
Thu Apr 25 02:59:42 CDT 2013


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 file 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();
-- 
1.8.1.5




More information about the wine-patches mailing list