[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.
This commit is contained in:
akallabeth 2024-03-08 19:56:14 +01:00 committed by akallabeth
parent a4cc020b75
commit fd46a43934

View File

@ -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;
}