From c4f41027587cf0bd582e2c953a6ecba3f26ab789 Mon Sep 17 00:00:00 2001 From: kallaballa Date: Wed, 8 Mar 2023 09:03:33 +0100 Subject: [PATCH] poll events after swap --- src/common/viz2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/viz2d.cpp b/src/common/viz2d.cpp index f8e7226e6..9b893aa3f 100644 --- a/src/common/viz2d.cpp +++ b/src/common/viz2d.cpp @@ -678,7 +678,6 @@ bool Viz2D::display() { bool result = true; if (!offscreen_) { makeCurrent(); - glfwPollEvents(); screen().draw_contents(); #ifndef __EMSCRIPTEN__ clglContext_->blitFrameBufferToScreen(getViewport(), getWindowSize(), isStretching()); @@ -687,6 +686,7 @@ bool Viz2D::display() { #endif screen().draw_widgets(); glfwSwapBuffers(glfwWindow_); + glfwPollEvents(); result = !glfwWindowShouldClose(glfwWindow_); }