From bf4265785095e4e1a41d90a32200974d5538bf2e Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 20 Aug 2016 23:59:54 +0200 Subject: [PATCH] Nav: Clearing mouse hover flag using MouseClicked[] test instead of MouseDown[] so that invalid mouse button won't keep breaking nav (#323) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 9fa3a282..8d85c29f 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2817,7 +2817,7 @@ void ImGui::NewFrame() { g.IO.MouseDragMaxDistanceSqr[i] = ImMax(g.IO.MouseDragMaxDistanceSqr[i], ImLengthSqr(g.IO.MousePos - g.IO.MouseClickedPos[i])); } - if (g.IO.MouseDown[i]) // Pressing any mouse button reactivate mouse hovering which may have been deactivated by gamepad/keyboard navigation + if (g.IO.MouseClicked[i]) // Clicking any mouse button reactivate mouse hovering which may have been deactivated by gamepad/keyboard navigation g.NavDisableMouseHover = false; }