diff --git a/src/rdp_session_backend.cpp b/src/rdp_session_backend.cpp index f9a8fcc..4784259 100644 --- a/src/rdp_session_backend.cpp +++ b/src/rdp_session_backend.cpp @@ -1933,6 +1933,30 @@ bool RdpSessionBackend::sendDisplayResize(rdp_freerdp* instance, int width, int m_lastResizeHeight = height; m_lastResizeScale = static_cast(scaleValue); + // The Display Control channel (MS-RDPEDISP) has no server + // acknowledgment PDU, and real hosts apply the new resolution + // without a Deactivation-Reactivation sequence — so + // update->DesktopResize (which only fires for that sequence, or + // for the GFX/Progressive pipeline we don't use) never runs for + // a channel-driven resize. Without a matching gdi_resize() call, + // gdi->width/height stay at the old size, and FreeRDP's own + // surface-bits handling (intersect_rect in gdi.c) then silently + // *drops* any update reaching outside those stale bounds — + // which is what produced the missing/misplaced taskbar and + // stale composited-looking content: this call is the fix, not + // just a best-effort nudge. + if (instance->context->gdi != nullptr + && gdi_resize(instance->context->gdi, static_cast(width), + static_cast(height))) { + emit remoteDesktopSizeChanged(width, height); + } else if (instance->context->gdi != nullptr) { + emit eventLogged(QStringLiteral( + "RDP warning: local resize to %1x%2 failed; display may show stale content " + "until the next full repaint.") + .arg(width) + .arg(height)); + } + // Best-effort nudge: some hosts don't fully repaint their own // desktop after a resolution change (observed: taskbar missing // until something else forces a redraw). Explicitly asking for