summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/window.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 53a01d71..1599d372 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -626,17 +626,21 @@ static iBool isMaximized_Window_(const iWindow *d) {
626 626
627static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) { 627static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) {
628 switch (ev->event) { 628 switch (ev->event) {
629#if defined (LAGRANGE_ENABLE_WINDOWPOS_FIX)
630 case SDL_WINDOWEVENT_EXPOSED: 629 case SDL_WINDOWEVENT_EXPOSED:
630 /* Since we are manually controlling when to redraw the window, we are responsible
631 for ensuring that window contents get redrawn after expose events. Under certain
632 circumstances (e.g., under openbox), not doing this would mean that the window
633 is missing contents until other events trigger a refresh. */
634 postRefresh_App();
635#if defined (LAGRANGE_ENABLE_WINDOWPOS_FIX)
631 if (d->initialPos.x >= 0) { 636 if (d->initialPos.x >= 0) {
632 int bx, by; 637 int bx, by;
633 SDL_GetWindowBordersSize(d->win, &by, &bx, NULL, NULL); 638 SDL_GetWindowBordersSize(d->win, &by, &bx, NULL, NULL);
634 SDL_SetWindowPosition(d->win, d->initialPos.x + bx, d->initialPos.y + by); 639 SDL_SetWindowPosition(d->win, d->initialPos.x + bx, d->initialPos.y + by);
635 d->initialPos = init1_I2(-1); 640 d->initialPos = init1_I2(-1);
636 } 641 }
637 postRefresh_App();
638 return iFalse;
639#endif 642#endif
643 return iFalse;
640 case SDL_WINDOWEVENT_MOVED: { 644 case SDL_WINDOWEVENT_MOVED: {
641 if (!isMaximized_Window_(d) && !d->isDrawFrozen) { 645 if (!isMaximized_Window_(d) && !d->isDrawFrozen) {
642 d->lastRect.pos = init_I2(ev->data1, ev->data2); 646 d->lastRect.pos = init_I2(ev->data1, ev->data2);