diff --git a/imgui.cpp b/imgui.cpp index 6de7c7711..e0c882b52 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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.