Merge pull request #10490 from akallabeth/desktop-resize-deadlock

Desktop resize deadlock
This commit is contained in:
akallabeth 2024-08-20 13:28:04 +02:00 committed by GitHub
commit 7fe1164d26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -458,12 +458,14 @@ static BOOL xf_sw_desktop_resize(rdpContext* context)
xfContext* xfc = (xfContext*)context;
rdpSettings* settings = context->settings;
BOOL ret = FALSE;
xf_lock_x11(xfc);
if (!gdi_resize(gdi, freerdp_settings_get_uint32(settings, FreeRDP_DesktopWidth),
freerdp_settings_get_uint32(settings, FreeRDP_DesktopHeight)))
goto out;
return FALSE;
/* Do not lock during gdi_resize, there might still be drawing operations in progress.
* locking will deadlock. */
xf_lock_x11(xfc);
if (xfc->image)
{
xfc->image->data = NULL;