summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/window.c5
-rw-r--r--src/ui/window.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 2062a3bb..2d65a655 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -729,6 +729,7 @@ void init_Window(iWindow *d, iRect rect) {
729 d->lastNotifiedSize = zero_I2(); 729 d->lastNotifiedSize = zero_I2();
730 d->pendingCursor = NULL; 730 d->pendingCursor = NULL;
731 d->isDrawFrozen = iTrue; 731 d->isDrawFrozen = iTrue;
732 d->isExposed = iFalse;
732 d->isMouseInside = iTrue; 733 d->isMouseInside = iTrue;
733 d->focusGainedAt = 0; 734 d->focusGainedAt = 0;
734 uint32_t flags = 0; 735 uint32_t flags = 0;
@@ -849,6 +850,10 @@ static void invalidate_Window_(iWindow *d) {
849static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) { 850static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) {
850 switch (ev->event) { 851 switch (ev->event) {
851 case SDL_WINDOWEVENT_EXPOSED: 852 case SDL_WINDOWEVENT_EXPOSED:
853 if (!d->isExposed) {
854 drawBlank_Window_(d); /* avoid showing system-provided contents */
855 d->isExposed = iTrue;
856 }
852 /* Since we are manually controlling when to redraw the window, we are responsible 857 /* Since we are manually controlling when to redraw the window, we are responsible
853 for ensuring that window contents get redrawn after expose events. Under certain 858 for ensuring that window contents get redrawn after expose events. Under certain
854 circumstances (e.g., under openbox), not doing this would mean that the window 859 circumstances (e.g., under openbox), not doing this would mean that the window
diff --git a/src/ui/window.h b/src/ui/window.h
index 25d81e6f..5bde9065 100644
--- a/src/ui/window.h
+++ b/src/ui/window.h
@@ -38,6 +38,7 @@ struct Impl_Window {
38 iRect lastRect; /* updated when window is moved/resized */ 38 iRect lastRect; /* updated when window is moved/resized */
39 iInt2 lastNotifiedSize; /* keep track of horizontal/vertical notifications */ 39 iInt2 lastNotifiedSize; /* keep track of horizontal/vertical notifications */
40 iBool isDrawFrozen; /* avoids premature draws while restoring window state */ 40 iBool isDrawFrozen; /* avoids premature draws while restoring window state */
41 iBool isExposed;
41 iBool isMouseInside; 42 iBool isMouseInside;
42 uint32_t focusGainedAt; 43 uint32_t focusGainedAt;
43 SDL_Renderer *render; 44 SDL_Renderer *render;