[client,sdl] unify all gdi_suppress_output calls

This commit is contained in:
akallabeth
2025-04-03 12:16:57 +02:00
parent 7a8625e71a
commit ec9c935c36
2 changed files with 6 additions and 12 deletions

View File

@@ -348,7 +348,9 @@ bool sdlDispContext::handle_window_event(const SDL_WindowEvent* ev)
case SDL_EVENT_WINDOW_SHOWN:
case SDL_EVENT_WINDOW_MAXIMIZED:
case SDL_EVENT_WINDOW_RESTORED:
(void)_sdl->redraw();
if (!_sdl->redraw())
return false;
/* fallthrough */
WINPR_FALLTHROUGH
case SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED:

View File

@@ -316,14 +316,6 @@ static BOOL sdl_begin_paint(rdpContext* context)
return TRUE;
}
static BOOL sdl_redraw(SdlContext* sdl)
{
WINPR_ASSERT(sdl);
auto gdi = sdl->context()->gdi;
return gdi_send_suppress_output(gdi, FALSE);
}
class SdlEventUpdateTriggerGuard
{
private:
@@ -938,13 +930,13 @@ static int sdl_run(SdlContext* sdl)
break;
case SDL_EVENT_RENDER_TARGETS_RESET:
sdl_redraw(sdl);
(void)sdl->redraw();
break;
case SDL_EVENT_RENDER_DEVICE_RESET:
sdl_redraw(sdl);
(void)sdl->redraw();
break;
case SDL_EVENT_WILL_ENTER_FOREGROUND:
sdl_redraw(sdl);
(void)sdl->redraw();
break;
case SDL_EVENT_USER_CERT_DIALOG:
{