Commit 397cd1c0 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Remove now unnecessary ClipCursor forwarding to foreground thread.

parent 47e208e9
......@@ -1564,20 +1564,9 @@ BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset )
if (!reset && grab_pointer)
{
RECT virtual_rect = NtUserGetVirtualScreenRect();
HWND foreground = NtUserGetForegroundWindow();
DWORD tid, pid;
if (!clip) clip = &virtual_rect;
/* forward request to the foreground window if it's in a different thread */
tid = NtUserGetWindowThread( foreground, &pid );
if (tid && tid != GetCurrentThreadId() && pid == GetCurrentProcessId())
{
TRACE( "forwarding clip request to %p\n", foreground );
send_notify_message( foreground, WM_X11DRV_CLIP_CURSOR_REQUEST, FALSE, FALSE );
return TRUE;
}
/* we are clipping if the clip rectangle is smaller than the screen */
if (clip->left > virtual_rect.left || clip->right < virtual_rect.right ||
clip->top > virtual_rect.top || clip->bottom < virtual_rect.bottom)
......@@ -1589,8 +1578,8 @@ BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset )
struct x11drv_thread_data *data = x11drv_thread_data();
if (data && data->clip_hwnd)
{
if (EqualRect( clip, &clip_rect ) || clip_fullscreen_window( foreground, TRUE ))
return TRUE;
if (EqualRect( clip, &clip_rect )) return TRUE;
if (clip_fullscreen_window( NtUserGetForegroundWindow(), TRUE )) return TRUE;
}
}
}
......@@ -1605,20 +1594,12 @@ BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset )
*/
LRESULT clip_cursor_request( HWND hwnd, BOOL fullscreen, BOOL reset )
{
RECT clip;
if (hwnd == NtUserGetDesktopWindow())
WARN( "ignoring clip cursor request on desktop window.\n" );
else if (hwnd != NtUserGetForegroundWindow())
WARN( "ignoring clip cursor request on non-foreground window.\n" );
else if (fullscreen)
clip_fullscreen_window( hwnd, reset );
else
{
NtUserGetClipCursor( &clip );
X11DRV_ClipCursor( &clip, FALSE );
}
return 0;
}
......
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