From 179d68ca37abe4e474abdc7594e2b92ae1351f0a Mon Sep 17 00:00:00 2001 From: "jun.zhang" Date: Wed, 26 Mar 2025 17:31:16 +0800 Subject: [PATCH] FIX: imgui key event related issue jira: github-6167 Change-Id: I30be4c4df4ef8eea695fed73ace1d380e790bf76 (cherry picked from commit 8c755cbca108f4f0d1a78d8296cd503caf5c0ca7) --- src/slic3r/GUI/ImGuiWrapper.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 115515ae8a..883bc836e2 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -529,6 +529,10 @@ void ImGuiWrapper::new_frame() ImGuiIO& io = ImGui::GetIO(); + ImGui::NewFrame(); + m_new_frame_open = true; + + // BBL: we should render the new frame first, than reset keys' status // BBL: copy & paste form prusa github repo (https://github.com/prusa3d/PrusaSlicer/blob/master/src/slic3r/GUI/ImGuiWrapper.cpp#L375C5-L402C6) // synchronize key states // when the application loses the focus it may happen that the key up event is not processed @@ -559,9 +563,6 @@ void ImGuiWrapper::new_frame() } // BBL: end copy & paste - - ImGui::NewFrame(); - m_new_frame_open = true; } void ImGuiWrapper::render()