From 69b64e2b73ff583c30f4af0dc4983b07b9fd9451 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 16 Jan 2024 11:50:00 +0100 Subject: [PATCH] Internals: Docking: revert 32a3c61 in favor of user explicitely calling SetWindowParentWindowForFocusRoute(). (#6798) The revert doesn't look the same as 32a3c61 as since then we are baking focus roue into NavFocusScopePath(). --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 58d30b01..f318c7c2 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6842,7 +6842,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // There's little point to expose a flag to set this: because the interesting cases won't be using parent_window_in_stack, // e.g. linking a tool window in a standalone viewport to a document window, regardless of their Begin() stack parenting. (#6798) - window->ParentWindowForFocusRoute = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window_in_stack : NULL; + window->ParentWindowForFocusRoute = (window->RootWindow != window) ? parent_window_in_stack : NULL; } // Add to focus scope stack