[PATCH 0/1] MR7025: winex11: Sync gl drawable outside of the win_data mutex.
Some thread might be destroying a window, calling destroy_client_window from release_gl_drawable, holding the GL context mutex and trying to enter the win_data mutex. At the same time, another thread might be moving its window, calling sync_gl_drawable from X11DRV_WindowPosChanged, holding the win_data mutex and trying to enter the GL context mutex. The deadlock was present before already, although less frequently triggered as sync_gl_drawable was done conditionally if the client window has been moved. This triggers now more frequently in the dxgi:dxgi tests. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7025
From: Rémi Bernon <rbernon(a)codeweavers.com> Some thread might be destroying a window, calling destroy_client_window from release_gl_drawable, holding the GL context mutex and trying to enter the win_data mutex. At the same time, another thread might be moving its window, calling sync_gl_drawable from X11DRV_WindowPosChanged, holding the win_data mutex and trying to enter the GL context mutex. The deadlock was present before already, although less frequently triggered as sync_gl_drawable was done conditionally if the client window has been moved. This triggers now more frequently in the dxgi:dxgi tests. --- dlls/winex11.drv/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index d109d6a744e..bf415f19cb9 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2932,6 +2932,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN struct window_rects old_rects; BOOL was_fullscreen; + sync_gl_drawable( hwnd, FALSE ); + if (!(data = get_win_data( hwnd ))) return; old_style = new_style & ~(WS_VISIBLE | WS_MINIMIZE | WS_MAXIMIZE); @@ -2950,7 +2952,6 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN XFlush( gdi_display ); /* make sure painting is done before we move the window */ sync_client_position( data, &old_rects ); - sync_gl_drawable( hwnd, FALSE ); if (!data->whole_window) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7025
participants (1)
-
Rémi Bernon