From b0fc30bd199636d5f94e59a07c7b0846b964e1f3 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 22 Aug 2017 20:49:02 +0800 Subject: [PATCH] Merge branch 'master' into navigation --- imgui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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));