code quality: Forward-port code comments
Minor change to the GFX resize state machine following review comments on backport to v0.10: https://github.com/neutrinolabs/xrdp/pull/3834 There are no functional changes as a result of this commit (cherry picked from commit a2fd7b7ef7c7f7c67b429634d2a1749492198cf2)
This commit is contained in:
@@ -936,6 +936,8 @@ xrdp_egfx_open_response(struct xrdp_process *id, int chan_id,
|
|||||||
static int
|
static int
|
||||||
xrdp_egfx_close_response(struct xrdp_process *id, int chan_id)
|
xrdp_egfx_close_response(struct xrdp_process *id, int chan_id)
|
||||||
{
|
{
|
||||||
|
UNUSED_VAR(id);
|
||||||
|
UNUSED_VAR(chan_id);
|
||||||
LOG(LOG_LEVEL_TRACE, "xrdp_egfx_close_response:");
|
LOG(LOG_LEVEL_TRACE, "xrdp_egfx_close_response:");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-11
@@ -1796,17 +1796,7 @@ process_display_control_monitor_layout_data(struct xrdp_wm *wm)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WMRZ_ENCODER_CREATE:
|
case WMRZ_ENCODER_CREATE:
|
||||||
if (mm->egfx_up)
|
// Resize the screen to the target size
|
||||||
{
|
|
||||||
xrdp_mm_egfx_create_surfaces(mm);
|
|
||||||
}
|
|
||||||
mm->encoder = xrdp_encoder_create(mm);
|
|
||||||
|
|
||||||
// Ack all frames to speed up resize.
|
|
||||||
module->mod_frame_ack(module, 0, INT_MAX);
|
|
||||||
|
|
||||||
// Restart module output after resizing and invalidating
|
|
||||||
// the screen. This causes an automatic redraw.
|
|
||||||
error = xrdp_bitmap_resize(
|
error = xrdp_bitmap_resize(
|
||||||
wm->screen, desc_width, desc_height);
|
wm->screen, desc_width, desc_height);
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
@@ -1816,6 +1806,18 @@ process_display_control_monitor_layout_data(struct xrdp_wm *wm)
|
|||||||
" xrdp_bitmap_resize failed %d", error);
|
" xrdp_bitmap_resize failed %d", error);
|
||||||
return advance_error(error, mm);
|
return advance_error(error, mm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create the encoder and surfaces
|
||||||
|
if (mm->egfx_up)
|
||||||
|
{
|
||||||
|
xrdp_mm_egfx_create_surfaces(mm);
|
||||||
|
}
|
||||||
|
mm->encoder = xrdp_encoder_create(mm);
|
||||||
|
|
||||||
|
// Ack all frames to speed up resize.
|
||||||
|
module->mod_frame_ack(module, 0, INT_MAX);
|
||||||
|
|
||||||
|
// Redraw the screen
|
||||||
xrdp_bitmap_invalidate(wm->screen, 0);
|
xrdp_bitmap_invalidate(wm->screen, 0);
|
||||||
xrdp_rdp_suppress_output(wm->session->rdp,
|
xrdp_rdp_suppress_output(wm->session->rdp,
|
||||||
0, XSO_REASON_DYNAMIC_RESIZE,
|
0, XSO_REASON_DYNAMIC_RESIZE,
|
||||||
|
|||||||
Reference in New Issue
Block a user