Lagrange [release]

Window: Don't trigger a draw during SDL_ShowWindow

=> 34c78f70abddefcae6e05502a0a964b0539e62f8

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) {
         default: {
             SDL_Event event = *ev;
             if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.unfreeze") && mw) {
-                mw->isDrawFrozen = iFalse;
                 if (SDL_GetWindowFlags(d->win) & SDL_WINDOW_HIDDEN) {
+                    mw->isDrawFrozen = iTrue; /* don't trigger a redraw now */
                     SDL_ShowWindow(d->win);
                 }
+                mw->isDrawFrozen = iFalse;
                 draw_MainWindow(mw); /* don't show a frame of placeholder content */
                 postCommand_App("media.player.update"); /* in case a player needs updating */
                 return iTrue;
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/cdiff/34c78f70abddefcae6e05502a0a964b0539e62f8
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
63.622648 milliseconds
Gemini-to-HTML Time
0.392194 milliseconds

This content has been proxied by September (ba2dc).