diff --git a/imgui.cpp b/imgui.cpp index 4519c96fb..753f87a76 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10721,6 +10721,7 @@ void ImGui::UpdateMouseWheel() if (do_scroll[ImGuiAxis_X]) { LockWheelingWindow(window, wheel.x); + SetKeyOwner(ImGuiKey_MouseWheelX, window->ID); float max_step = window->InnerRect.GetWidth() * 0.67f; float scroll_step = ImTrunc(ImMin(2 * window->FontRefSize, max_step)); SetScrollX(window, window->Scroll.x - wheel.x * scroll_step); @@ -10729,6 +10730,7 @@ void ImGui::UpdateMouseWheel() if (do_scroll[ImGuiAxis_Y]) { LockWheelingWindow(window, wheel.y); + SetKeyOwner(ImGuiKey_MouseWheelY, window->ID); float max_step = window->InnerRect.GetHeight() * 0.67f; float scroll_step = ImTrunc(ImMin(5 * window->FontRefSize, max_step)); SetScrollY(window, window->Scroll.y - wheel.y * scroll_step);