From b4b9ed6ce6ab75036472a4342431230b26b39267 Mon Sep 17 00:00:00 2001 From: cedrozor Date: Fri, 27 Oct 2017 14:30:00 +0200 Subject: [PATCH] fixed hdc initialization into wf_begin_paint so the region invalidation into wf_end_paint applies to the same hdc the objective is that only the updated region(s) are refreshed instead of the whole screen it's not much a problem for normal FreeRDP usage but becomes a serious issue if the display is processed, forwarded and rendered remotely, as done by web gateways such as Guacamole, FreeRDP-WebConnect and Myrtille (I'm the author of the latter) --- client/Windows/wf_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/Windows/wf_client.c b/client/Windows/wf_client.c index 5e0478bfc..cb6df5198 100644 --- a/client/Windows/wf_client.c +++ b/client/Windows/wf_client.c @@ -119,10 +119,10 @@ static BOOL wf_begin_paint(rdpContext* context) { HGDI_DC hdc; - if (!context || !context->gdi || !context->gdi->hdc) + if (!context || !context->gdi || !context->gdi->primary || !context->gdi->primary->hdc) return FALSE; - hdc = context->gdi->hdc; + hdc = context->gdi->primary->hdc; if (!hdc || !hdc->hwnd || !hdc->hwnd->invalid) return FALSE;