Commit 76bbf106 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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.
parent e54c49d9
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment