Nav, Docking: Fixed failing to restore NavId when refocusing due to missing nav window.

This commit is contained in:
omar 2020-02-02 22:40:56 +01:00
parent 365b639981
commit 3bde375078

View File

@ -6746,7 +6746,7 @@ void ImGui::FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWind
{
// We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user.
ImGuiWindow* window = g.WindowsFocusOrder[i];
if (window != ignore_window && window->WasActive && !(window->Flags & ImGuiWindowFlags_ChildWindow))
if (window != ignore_window && window->WasActive && window->RootWindowDockStop == window)
if ((window->Flags & (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs)) != (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs))
{
// FIXME-DOCK: This is failing (lagging by one frame) for docked windows.