summaryrefslogtreecommitdiff
path: root/src/ui/window.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-02-20 17:00:00 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-02-20 17:00:00 +0200
commitcebc848472629d63cf633973a34df0bc9858efc6 (patch)
treeff254cf90ed20aeaaf99371361a5f81ea5224462 /src/ui/window.h
parent2e756e225a6c2b7972cfd9914ff935c290aa3b68 (diff)
Window-specific refresh
When updating, mark pending refresh per window so one doesn't have to draw all of them at once.
Diffstat (limited to 'src/ui/window.h')
-rw-r--r--src/ui/window.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/window.h b/src/ui/window.h
index c3c34e1b..4df1be1e 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -86,6 +86,7 @@ struct Impl_Window {
86 iBool isMinimized; 86 iBool isMinimized;
87 iBool isMouseInside; 87 iBool isMouseInside;
88 iBool isInvalidated; 88 iBool isInvalidated;
89 iAtomicInt isRefreshPending;
89 iBool ignoreClick; 90 iBool ignoreClick;
90 uint32_t focusGainedAt; 91 uint32_t focusGainedAt;
91 SDL_Renderer *render; 92 SDL_Renderer *render;
@@ -98,13 +99,13 @@ struct Impl_Window {
98 float displayScale; /* DPI-based scaling factor of current display, affects uiScale only */ 99 float displayScale; /* DPI-based scaling factor of current display, affects uiScale only */
99 float uiScale; 100 float uiScale;
100 uint32_t frameTime; 101 uint32_t frameTime;
101 double presentTime;
102 SDL_Cursor * cursors[SDL_NUM_SYSTEM_CURSORS]; 102 SDL_Cursor * cursors[SDL_NUM_SYSTEM_CURSORS];
103 SDL_Cursor * pendingCursor; 103 SDL_Cursor * pendingCursor;
104 iRoot * roots[2]; /* root widget and UI state; second one is for split mode */ 104 iRoot * roots[2]; /* root widget and UI state; second one is for split mode */
105 iRoot * keyRoot; /* root that has the current keyboard input focus */ 105 iRoot * keyRoot; /* root that has the current keyboard input focus */
106 SDL_Texture * borderShadow; 106 SDL_Texture * borderShadow;
107 iText * text; 107 iText * text;
108 unsigned int frameCount;
108}; 109};
109 110
110struct Impl_MainWindow { 111struct Impl_MainWindow {