diff options
author | David Robillard <d@drobilla.net> | 2023-01-07 19:27:14 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-07 20:27:35 -0500 |
commit | 4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b (patch) | |
tree | 63307cb14d43c7391b34f94ca0e532d8e9e01a09 /examples/pugl_vulkan_cpp_demo.cpp | |
parent | 677e13dcbb5b64ce85093b9ea5c14025964e35b9 (diff) | |
download | pugl-4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b.tar.gz pugl-4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b.tar.bz2 pugl-4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b.zip |
Add support for special view types and styles
Diffstat (limited to 'examples/pugl_vulkan_cpp_demo.cpp')
-rw-r--r-- | examples/pugl_vulkan_cpp_demo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<uint32_t>(event.width), static_cast<uint32_t>(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<double>(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; } |