diff --git a/imgui.cpp b/imgui.cpp index bb5799c9e..2ef0b6b07 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5725,7 +5725,8 @@ bool ImGui::IsWindowHovered() bool ImGui::IsWindowRectHovered() { - return GImGui->HoveredWindow == GImGui->CurrentWindow; + ImGuiContext& g = *GImGui; + return g.HoveredWindow == g.CurrentWindow; } bool ImGui::IsWindowFocused() @@ -7786,6 +7787,7 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s if (v_speed == 0.0f && (v_max - v_min) != 0.0f && (v_max - v_min) < FLT_MAX) v_speed = (v_max - v_min) * g.DragSpeedDefaultRatio; + if (g.ActiveIdSource == ImGuiInputSource_Nav) v_speed = ImMax(v_speed, GetMinimumStepAtDecimalPrecision(decimal_precision));