mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
winex11.drv: Release window data before calling sync_window_cursor().
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.
This commit is contained in:
parent
140456a058
commit
e5c6f915bb
|
@ -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())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue