summaryrefslogtreecommitdiff
path: root/src/ui/window.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-14 14:09:59 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-14 14:09:59 +0300
commitc2dd6107db2ff4b8001085068f4c1c5971cdd9c3 (patch)
treef4dc684dae9611abf1f672c853de44c8911db8fd /src/ui/window.h
parentbf390e96735a156cb221385cc057aeb957c088b9 (diff)
Cleaner window initialization
Create the window using the correct size and position, and don’t show the window contents while app state is being restored.
Diffstat (limited to 'src/ui/window.h')
-rw-r--r--src/ui/window.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/window.h b/src/ui/window.h
index 413c454c..6f4e01ce 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -2,16 +2,17 @@
2 2
3#include "widget.h" 3#include "widget.h"
4 4
5#include <the_Foundation/defs.h> 5#include <the_Foundation/rect.h>
6#include <SDL_events.h> 6#include <SDL_events.h>
7#include <SDL_render.h> 7#include <SDL_render.h>
8#include <SDL_video.h> 8#include <SDL_video.h>
9 9
10iDeclareType(Window) 10iDeclareType(Window)
11iDeclareTypeConstruction(Window) 11iDeclareTypeConstructionArgs(Window, iRect rect)
12 12
13struct Impl_Window { 13struct Impl_Window {
14 SDL_Window * win; 14 SDL_Window * win;
15 iBool isBlank; /* avoids premature draws while restoring window state */
15 SDL_Renderer *render; 16 SDL_Renderer *render;
16 iWidget * root; 17 iWidget * root;
17 float pixelRatio; 18 float pixelRatio;