From c2dd6107db2ff4b8001085068f4c1c5971cdd9c3 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 14 Aug 2020 14:09:59 +0300 Subject: Cleaner window initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create the window using the correct size and position, and don’t show the window contents while app state is being restored. --- src/ui/window.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui/window.h') 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 @@ #include "widget.h" -#include +#include #include #include #include iDeclareType(Window) -iDeclareTypeConstruction(Window) +iDeclareTypeConstructionArgs(Window, iRect rect) struct Impl_Window { SDL_Window * win; + iBool isBlank; /* avoids premature draws while restoring window state */ SDL_Renderer *render; iWidget * root; float pixelRatio; -- cgit v1.2.3