From fb0b9c7160514b1c524c0c98fcf8bac2be4c7f3a Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 3 Oct 2022 14:55:22 +0200 Subject: [PATCH] Docking: Fixed missing highlight when using dock node host window borders. (#5702) Amend 8f434874, 9764adc7b, 24dfebf45 --- imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 1bf5468e5b23..a158950043d4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -15563,7 +15563,8 @@ static bool IsDockNodeTitleBarHighlighted(ImGuiDockNode* node, ImGuiDockNode* ro ImGuiWindow* parent_window = g.NavWindow->RootWindow; while (parent_window->Flags & ImGuiWindowFlags_ChildMenu) parent_window = parent_window->ParentWindow->RootWindow; - for (ImGuiDockNode* parent_node = parent_window->DockNode; parent_node != NULL; parent_node = parent_node->HostWindow ? parent_node->HostWindow->RootWindow->DockNode : NULL) + ImGuiDockNode* start_parent_node = parent_window->DockNodeAsHost ? parent_window->DockNodeAsHost : parent_window->DockNode; + for (ImGuiDockNode* parent_node = start_parent_node; parent_node != NULL; parent_node = parent_node->HostWindow ? parent_node->HostWindow->RootWindow->DockNode : NULL) if ((parent_node = ImGui::DockNodeGetRootNode(parent_node)) == root_node) return true; }