From 279f6162b8f41672c3b0130af92e0ac0a666528f Mon Sep 17 00:00:00 2001 From: zhenyan121 <3367366583@qq.com> Date: Tue, 14 Jul 2026 15:38:47 +0800 Subject: [PATCH] refactor(app): remove redundant ImGui WantCaptureMouse check in cursor callback --- src/app.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index ac830f5..9c7193c 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -23,12 +23,10 @@ App::App() App::~App() {} void App::cursor_position_callback(GLFWwindow* window, double xpos, double ypos) { - ImGuiIO& io = ImGui::GetIO(); - App* app = static_cast(glfwGetWindowUserPointer(window)); ASSERT_MSG(app, "nullptr"); - if (io.WantCaptureMouse && app->m_window.is_enable_imgui()) { + if (app->m_window.is_enable_imgui()) { ImGui_ImplGlfw_CursorPosCallback(window, xpos, ypos); return; }