Skip to content

Commit

Permalink
Merge pull request neutrinolabs#2291 from Nexarian/fix_mstsc_resize_bug
Browse files Browse the repository at this point in the history
Fixes MSTSC resize issue/crash
  • Loading branch information
Nexarian authored Jun 27, 2022
2 parents 55215cf + 965dbde commit eeb5daa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions xrdp/xrdp_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.session_width = description->session_width;
wm->client_info->display_sizes.session_height = description->session_height;
Expand Down

0 comments on commit eeb5daa

Please sign in to comment.