This prevents a deadlock between the window data lock and the ntdll loader lock because sync_window_cursor() eventually may grab the ntdll loader lock. So if another thread already grabbed the ntdll loader lock and wants to enter the same window data critical section, it will deadlock.
Fix Youropa (SteamID: 640120) OpenGL launch option launching to a black screen.
From: Zhiyi Zhang zzhang@codeweavers.com
This prevents a deadlock between the window data lock and the ntdll loader lock because sync_window_cursor() eventually may grab the ntdll loader lock. So if another thread already grabbed the ntdll loader lock and wants to enter the same window data critical section, it will deadlock.
Fix Youropa (SteamID: 640120) OpenGL launch option launching to a black screen. --- dlls/winex11.drv/mouse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index ebc8be643af..d1ade2eda68 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -644,6 +644,7 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPUT *input ) { struct x11drv_win_data *data; + Window win = 0;
input->type = INPUT_MOUSE;
@@ -665,13 +666,14 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU }
if (!(data = get_win_data( hwnd ))) return; + win = data->whole_window; + release_win_data( data ); if (InterlockedExchangePointer( (void **)&cursor_window, hwnd ) != hwnd || input->u.mi.time - last_cursor_change > 100) { - sync_window_cursor( data->whole_window ); + sync_window_cursor( win ); last_cursor_change = input->u.mi.time; } - release_win_data( data );
if (hwnd != NtUserGetDesktopWindow()) {