From ef2c3bcdee9af118a1345488dad53dd7bf04bec1 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 1 Feb 2018 18:02:55 +0100 Subject: [PATCH] Nav: Fixed InitRequest leaking when changing window (repro was to navigate inside File->Options->[Child] then press Left and notice how we would land on parent window on the fist item after the current one). (#787) --- imgui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 6ef58a62..daf39ec7 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6238,6 +6238,8 @@ void ImGui::FocusWindow(ImGuiWindow* window) g.NavMousePosDirty = true; if (window && window->NavLastChildNavWindow != NULL) window->NavLastChildNavWindow = NULL; + if (g.NavInitRequest) + g.NavInitRequest = false; } // Passing NULL allow to disable keyboard focus