From f44afda9ab070ee9de07f52f8937c2ff2f73d96c Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Mon, 11 Apr 2016 19:44:03 +0200 Subject: [PATCH] Added window resize for XCB (Fixes #105) --- base/vulkanexamplebase.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index dcce629a..b0693a4f 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -1183,6 +1183,20 @@ void VulkanExampleBase::handleEvent(const xcb_generic_event_t *event) case XCB_DESTROY_NOTIFY: quit = true; break; + case XCB_CONFIGURE_NOTIFY: + { + const xcb_configure_notify_event_t *cfgEvent = (const xcb_configure_notify_event_t *)event; + if ((prepared) && ((cfgEvent->width != width) || (cfgEvent->height != height))) + { + destWidth = cfgEvent->width; + destHeight = cfgEvent->height; + if ((destWidth > 0) && (destHeight > 0)) + { + windowResize(); + } + } + } + break; default: break; }