Skip to content

Commit

Permalink
winex11: Move the desktop process check from X11DRV_ClipCursor() to g…
Browse files Browse the repository at this point in the history
…rab_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.
  • Loading branch information
Henri Verbeet authored and julliard committed Apr 25, 2013
1 parent e54c49d commit 76bbf10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dlls/winex11.drv/mouse.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 76bbf10

Please sign in to comment.