From 3e2757100114fb29fc9476692943a71dd10ee049 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 9 Aug 2022 08:18:35 -0500 Subject: [PATCH] rdp: Apply scale in context resets at activation time Scale is currently always 1, but we can do this safely now to prepare for when it isn't. Signed-off-by: Derek Foreman --- libweston/backend-rdp/rdp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libweston/backend-rdp/rdp.c b/libweston/backend-rdp/rdp.c index 89413d7b..f50815fb 100644 --- a/libweston/backend-rdp/rdp.c +++ b/libweston/backend-rdp/rdp.c @@ -987,6 +987,7 @@ xf_peer_activate(freerdp_peer* client) struct weston_output *weston_output; char seat_name[50]; POINTER_SYSTEM_UPDATE pointer_system; + int width, height; peerCtx = (RdpPeerContext *)client->context; b = peerCtx->rdpBackend; @@ -1050,8 +1051,10 @@ xf_peer_activate(freerdp_peer* client) } weston_output = &output->base; - rfx_context_reset(peerCtx->rfx_context, weston_output->width, weston_output->height); - nsc_context_reset(peerCtx->nsc_context, weston_output->width, weston_output->height); + width = weston_output->width * weston_output->scale; + height = weston_output->height * weston_output->scale; + rfx_context_reset(peerCtx->rfx_context, width, height); + nsc_context_reset(peerCtx->nsc_context, width, height); if (peersItem->flags & RDP_PEER_ACTIVATED) return TRUE;