From 4d012cfda272d318b0aba20370bc0ed26cc14dc4 Mon Sep 17 00:00:00 2001 From: SlowRiot Date: Thu, 2 Apr 2026 22:54:32 +0100 Subject: [PATCH] leave the cursor alone if config requests no cursor change --- backends/imgui_impl_emscripten.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_emscripten.cpp b/backends/imgui_impl_emscripten.cpp index 19c42c2bd..837131841 100644 --- a/backends/imgui_impl_emscripten.cpp +++ b/backends/imgui_impl_emscripten.cpp @@ -422,7 +422,10 @@ void set_cursor_if_necessary(emscripten_browser_cursor_internal::cursor& current void update_cursor(ImGui_ImplEmscripten_Data* bd) { // Sync any cursor changes due to ImGui to the browser's cursor - if (ImGui::GetIO().WantCaptureMouse) // mouse is hovering over the gui + ImGuiIO& io{ImGui::GetIO()}; + if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange) return; + + if (io.WantCaptureMouse) // mouse is hovering over the gui { if (bd->CursorToRestore == nullptr) {