summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 5c7fcaab..f9e58acb 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -667,9 +667,16 @@ static void updateRootSize_Window_(iWindow *d, iBool notifyAlways) {
667 const iInt2 oldSize = *size; 667 const iInt2 oldSize = *size;
668 SDL_GetRendererOutputSize(d->render, &size->x, &size->y); 668 SDL_GetRendererOutputSize(d->render, &size->x, &size->y);
669 if (notifyAlways || !isEqual_I2(oldSize, *size)) { 669 if (notifyAlways || !isEqual_I2(oldSize, *size)) {
670 const iBool isHoriz = (d->lastNotifiedSize.x != size->x);
671 const iBool isVert = (d->lastNotifiedSize.y != size->y);
670 arrange_Widget(d->root); 672 arrange_Widget(d->root);
671 postCommandf_App("window.resized width:%d height:%d", size->x, size->y); 673 postCommandf_App("window.resized width:%d height:%d horiz:%d vert:%d",
674 size->x,
675 size->y,
676 isHoriz,
677 isVert);
672 postRefresh_App(); 678 postRefresh_App();
679 d->lastNotifiedSize = *size;
673 } 680 }
674} 681}
675 682
@@ -719,6 +726,7 @@ void init_Window(iWindow *d, iRect rect) {
719 iZap(d->cursors); 726 iZap(d->cursors);
720 d->initialPos = rect.pos; 727 d->initialPos = rect.pos;
721 d->lastRect = rect; 728 d->lastRect = rect;
729 d->lastNotifiedSize = zero_I2();
722 d->pendingCursor = NULL; 730 d->pendingCursor = NULL;
723 d->isDrawFrozen = iTrue; 731 d->isDrawFrozen = iTrue;
724 d->isMouseInside = iTrue; 732 d->isMouseInside = iTrue;