Docking: Fixed missing highlight when using dock node host window borders. (#5702)

Amend 8f434874, 9764adc7b, 24dfebf45
This commit is contained in:
ocornut 2022-10-03 14:55:22 +02:00
parent 69beaa1d0b
commit fb0b9c7160

View File

@ -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;
}