Commit 8322fc6a authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

Avoid holding x11drv lock while calling function that grabs gdi

lock. Prevents potential deadly embrace.
parent 84232099
......@@ -959,7 +959,6 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *winpos )
wine_tsx11_unlock();
}
wine_tsx11_lock();
if (bChangePos)
X11DRV_sync_whole_window_position( display, wndPtr, !(winpos->flags & SWP_NOZORDER) );
else
......@@ -973,7 +972,9 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *winpos )
(winpos->flags & SWP_FRAMECHANGED))
{
/* if we moved the client area, repaint the whole non-client window */
wine_tsx11_lock();
XClearArea( display, get_whole_window(wndPtr), 0, 0, 0, 0, True );
wine_tsx11_unlock();
winpos->flags |= SWP_FRAMECHANGED;
}
if (winpos->flags & SWP_SHOWWINDOW)
......@@ -986,8 +987,11 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *winpos )
{
/* resizing from zero size to non-zero -> map */
TRACE( "mapping non zero size or off-screen win %p\n", winpos->hwnd );
wine_tsx11_lock();
XMapWindow( display, get_whole_window(wndPtr) );
wine_tsx11_unlock();
}
wine_tsx11_lock();
XFlush( display ); /* FIXME: should not be necessary */
wine_tsx11_unlock();
}
......
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