winex11: Avoid deadlock when setting cursor.

Signed-off-by: Wei xie <xiewei@linuxdeepin.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Wei xie 2018-03-27 14:00:07 +08:00 committed by Alexandre Julliard
parent be002fd92b
commit 48fb9d6a03
1 changed files with 2 additions and 1 deletions

View File

@ -2712,8 +2712,9 @@ LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
case WM_X11DRV_SET_CURSOR:
if ((data = get_win_data( hwnd )))
{
if (data->whole_window) set_window_cursor( data->whole_window, (HCURSOR)lp );
Window win = data->whole_window;
release_win_data( data );
if (win) set_window_cursor( win, (HCURSOR)lp );
}
else if (hwnd == x11drv_thread_data()->clip_hwnd)
set_window_cursor( x11drv_thread_data()->clip_window, (HCURSOR)lp );