From 4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Jan 2023 19:27:14 -0500 Subject: Add support for special view types and styles --- examples/pugl_vulkan_cpp_demo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/pugl_vulkan_cpp_demo.cpp') diff --git a/examples/pugl_vulkan_cpp_demo.cpp b/examples/pugl_vulkan_cpp_demo.cpp index df0827e..487fab2 100644 --- a/examples/pugl_vulkan_cpp_demo.cpp +++ b/examples/pugl_vulkan_cpp_demo.cpp @@ -1475,6 +1475,7 @@ View::onEvent(const pugl::ConfigureEvent& event) _app.extent = {static_cast(event.width), static_cast(event.height)}; + _app.resizing = event.style & PUGL_VIEW_STYLE_RESIZING; return pugl::Status::success; } @@ -1640,7 +1641,6 @@ View::onEvent(const pugl::ExposeEvent&) pugl::Status View::onEvent(const pugl::LoopEnterEvent&) { - _app.resizing = true; startTimer(resizeTimerId, 1.0 / static_cast(getHint(pugl::ViewHint::refreshRate))); @@ -1660,7 +1660,6 @@ View::onEvent(const pugl::LoopLeaveEvent&) // Trigger a swapchain recreation with the normal present mode _app.renderer.swapchain.extent = {}; - _app.resizing = false; return pugl::Status::success; } -- cgit v1.2.1