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.
This commit is contained in:
parent
e54c49d940
commit
76bbf106a2
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue