Added window resize for XCB (Fixes #105)

This commit is contained in:
Sascha Willems 2016-04-11 19:44:03 +02:00
parent 23f3eb0170
commit f44afda9ab

View file

@ -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;
}