summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-01-22 14:50:23 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-01-22 14:50:23 +0200
commit34c78f70abddefcae6e05502a0a964b0539e62f8 (patch)
treea5bd4f3b428ec9e3123679826373937ff8e82aa3 /src
parente53e6dcc5caff996e9adbfedd507623ffbd179ae (diff)
Window: Don't trigger a draw during SDL_ShowWindow
IssueID #442
Diffstat (limited to 'src')
-rw-r--r--src/ui/window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index af36bb22..13abc5fa 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1001,10 +1001,11 @@ iBool processEvent_Window(iWindow *d, const SDL_Event *ev) {
1001 default: { 1001 default: {
1002 SDL_Event event = *ev; 1002 SDL_Event event = *ev;
1003 if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.unfreeze") && mw) { 1003 if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.unfreeze") && mw) {
1004 mw->isDrawFrozen = iFalse;
1005 if (SDL_GetWindowFlags(d->win) & SDL_WINDOW_HIDDEN) { 1004 if (SDL_GetWindowFlags(d->win) & SDL_WINDOW_HIDDEN) {
1005 mw->isDrawFrozen = iTrue; /* don't trigger a redraw now */
1006 SDL_ShowWindow(d->win); 1006 SDL_ShowWindow(d->win);
1007 } 1007 }
1008 mw->isDrawFrozen = iFalse;
1008 draw_MainWindow(mw); /* don't show a frame of placeholder content */ 1009 draw_MainWindow(mw); /* don't show a frame of placeholder content */
1009 postCommand_App("media.player.update"); /* in case a player needs updating */ 1010 postCommand_App("media.player.update"); /* in case a player needs updating */
1010 return iTrue; 1011 return iTrue;