winex11.drv: Don't wait for the desktop thread to store clipping window.
The messages are in flight, the state will be updated eventually in the order they are received by the desktop thread, we shouldn't have to wait. If the clipping window gets overwritten, it will also receive a message from the desktop thread, which is sent asynchronously already. Call of Duty: WWII calls ClipCursor in a loop on startup while the foreground thread is stalled and the messages sometimes pile up. The recursive message processing that SendMessageW induces can then cause stack overflows. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49643 Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f949087624
commit
432858b285
|
@ -445,7 +445,7 @@ static BOOL grab_clipping_window( const RECT *clip )
|
|||
if (!data->clip_hwnd) sync_window_cursor( clip_window );
|
||||
InterlockedExchangePointer( (void **)&cursor_window, msg_hwnd );
|
||||
data->clip_hwnd = msg_hwnd;
|
||||
SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd );
|
||||
SendNotifyMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, (LPARAM)msg_hwnd );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ void ungrab_clipping_window(void)
|
|||
XUnmapWindow( display, clip_window );
|
||||
if (clipping_cursor) XUngrabPointer( display, CurrentTime );
|
||||
clipping_cursor = FALSE;
|
||||
SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, 0 );
|
||||
SendNotifyMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue