Merge pull request #2291 from Nexarian/fix_mstsc_resize_bug

Fixes MSTSC resize issue/crash
This commit is contained in:
Nexarian 2022-06-26 22:58:54 -04:00 committed by GitHub
commit eeb5daa338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1130,6 +1130,17 @@ process_dynamic_monitor_description(struct xrdp_wm *wm,
} }
} }
// Need to recreate the encoder for connections that use it.
if (mm->encoder != NULL)
{
xrdp_encoder_delete(mm->encoder);
mm->encoder = NULL;
}
if (mm->encoder == NULL)
{
mm->encoder = xrdp_encoder_create(mm);
}
wm->client_info->display_sizes.monitorCount = description->monitorCount; wm->client_info->display_sizes.monitorCount = description->monitorCount;
wm->client_info->display_sizes.session_width = description->session_width; wm->client_info->display_sizes.session_width = description->session_width;
wm->client_info->display_sizes.session_height = description->session_height; wm->client_info->display_sizes.session_height = description->session_height;