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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 315c4243..e0dfe813 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -341,10 +341,13 @@ static void setupUserInterface_Window(iWindow *d) {
341 341
342static void updateRootSize_Window_(iWindow *d) { 342static void updateRootSize_Window_(iWindow *d) {
343 iInt2 *size = &d->root->rect.size; 343 iInt2 *size = &d->root->rect.size;
344 const iInt2 oldSize = *size;
344 SDL_GetRendererOutputSize(d->render, &size->x, &size->y); 345 SDL_GetRendererOutputSize(d->render, &size->x, &size->y);
345 arrange_Widget(d->root); 346 if (!isEqual_I2(oldSize, *size)) {
346 postCommandf_App("window.resized width:%d height:%d", size->x, size->y); 347 arrange_Widget(d->root);
347 postRefresh_App(); 348 postCommandf_App("window.resized width:%d height:%d", size->x, size->y);
349 postRefresh_App();
350 }
348} 351}
349 352
350static float pixelRatio_Window_(const iWindow *d) { 353static float pixelRatio_Window_(const iWindow *d) {