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:
matt335672
2026-07-20 09:51:14 +01:00
parent 8812646d0f
commit a5975210f0
2 changed files with 15 additions and 11 deletions
+2
View File
@@ -936,6 +936,8 @@ xrdp_egfx_open_response(struct xrdp_process *id, int chan_id,
static int
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:");
return 0;
}
+13 -11
View File
@@ -1796,17 +1796,7 @@ process_display_control_monitor_layout_data(struct xrdp_wm *wm)
break;
case WMRZ_ENCODER_CREATE:
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);
// Restart module output after resizing and invalidating
// the screen. This causes an automatic redraw.
// Resize the screen to the target size
error = xrdp_bitmap_resize(
wm->screen, desc_width, desc_height);
if (error != 0)
@@ -1816,6 +1806,18 @@ process_display_control_monitor_layout_data(struct xrdp_wm *wm)
" xrdp_bitmap_resize failed %d", error);
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_rdp_suppress_output(wm->session->rdp,
0, XSO_REASON_DYNAMIC_RESIZE,