From fd46a43934b4638ada4fe18db09b7e16228af5e8 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 8 Mar 2024 19:56:14 +0100 Subject: [PATCH] [core,update] reset invalid regions after BeginPaint Do not touch invalid regions before BeginPaint was called. This fixes issue #9953 as the sdl client is waiting in BeginPaint for the screen updates of EndPaint to be actually drawn. --- libfreerdp/core/update.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index db8ddef1b..cfc0abc54 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -3322,6 +3322,10 @@ BOOL update_begin_paint(rdpUpdate* update) WINPR_ASSERT(update->context); + BOOL rc = IFCALLRESULT(TRUE, update->BeginPaint, update->context); + if (!rc) + WLog_WARN(TAG, "BeginPaint call failed"); + /* Reset the invalid regions, we start a new frame here. */ rdpGdi* gdi = update->context->gdi; WINPR_ASSERT(gdi); @@ -3335,10 +3339,6 @@ BOOL update_begin_paint(rdpUpdate* update) hwnd->ninvalid = 0; } - BOOL rc = IFCALLRESULT(TRUE, update->BeginPaint, update->context); - if (!rc) - WLog_WARN(TAG, "BeginPaint call failed"); - return rc; }