summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-03 15:22:02 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-03 15:22:02 +0300
commit8e8e486a2969dbc20b3c3a08023267e9eab53265 (patch)
treeee5bf60115de72b0183c34a68b6236299e05593b /src/ui/window.c
parentb02c72a21692435dd974c2b767ee3e003ed6f846 (diff)
Drawing only during window update
Glyphs were inadvertently being cached already during measuring for layout. DocumentWidget was buffering graphics too early. Now buffered draws are prepared during normal drawing, when needed.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index f92107e3..27740326 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1769,12 +1769,8 @@ iBool processEvent_Window(iWindow *d, const SDL_Event *ev) {
1769 SDL_Event event = *ev; 1769 SDL_Event event = *ev;
1770 if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.unfreeze")) { 1770 if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.unfreeze")) {
1771 d->isDrawFrozen = iFalse; 1771 d->isDrawFrozen = iFalse;
1772 /* When the window is shown for the first time, ensure glyphs get
1773 re-cached correctly. */
1774 if (SDL_GetWindowFlags(d->win) & SDL_WINDOW_HIDDEN) { 1772 if (SDL_GetWindowFlags(d->win) & SDL_WINDOW_HIDDEN) {
1775 SDL_ShowWindow(d->win); 1773 SDL_ShowWindow(d->win);
1776 resetFonts_Text();
1777 postCommand_App("theme.changed");
1778 } 1774 }
1779 postRefresh_App(); 1775 postRefresh_App();
1780 return iTrue; 1776 return iTrue;