diff options
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 5 |
1 files changed, 5 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) { | |||
849 | static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) { | 850 | static 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 |