demos: Fix window resize on Linux
authorDamien Leone <dleone@nvidia.com>
Tue, 26 Jan 2016 22:34:12 +0000 (14:34 -0800)
committerJon Ashburn <jon@lunarg.com>
Thu, 4 Feb 2016 18:24:36 +0000 (11:24 -0700)
demos/cube.c
demos/tri.c

index d611f1e..f9b2cfe 100644 (file)
@@ -2011,6 +2011,8 @@ static void demo_handle_event(struct demo *demo,
         const xcb_configure_notify_event_t *cfg =
             (const xcb_configure_notify_event_t *)event;
         if ((demo->width != cfg->width) || (demo->height != cfg->height)) {
+            demo->width = cfg->width;
+            demo->height = cfg->height;
             demo_resize(demo);
         }
     } break;
index fa19b4e..a97b8ee 100644 (file)
@@ -1610,6 +1610,8 @@ static void demo_handle_event(struct demo *demo,
         const xcb_configure_notify_event_t *cfg =
             (const xcb_configure_notify_event_t *)event;
         if ((demo->width != cfg->width) || (demo->height != cfg->height)) {
+            demo->width = cfg->width;
+            demo->height = cfg->height;
             demo_resize(demo);
         }
     } break;