From f902435a538cf336ade6b9d4ddafb0b467df0443 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 3 Feb 2019 18:58:07 +0100 Subject: [PATCH] Docking: Fixed less of node size/pos caused by 1f2bdd37 (#2109) --- imgui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 593db341..975f8dd7 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10770,7 +10770,8 @@ ImGuiDockNode::ImGuiDockNode(ImGuiID id) LastFocusedNodeID = 0; SelectedTabID = 0; WantCloseTabID = 0; - AutorityForPos = AutorityForSize = AutorityForViewport = ImGuiDataAutority_Auto; + AutorityForPos = AutorityForSize = ImGuiDataAutority_DockNode; + AutorityForViewport = ImGuiDataAutority_Auto; IsVisible = true; IsFocused = IsCentralNode = IsHiddenTabBar = HasCloseButton = HasCollapseButton = false; WantCloseAll = WantLockSizeOnce = WantMouseMove = WantHiddenTabBarUpdate = WantHiddenTabBarToggle = false; @@ -11257,12 +11258,14 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node) // after the dock host window, losing their top-most status. if (node->HostWindow->Appearing) BringWindowToDisplayFront(node->HostWindow); + + node->AutorityForPos = node->AutorityForSize = node->AutorityForViewport = ImGuiDataAutority_Auto; } else if (node->ParentNode) { node->HostWindow = host_window = node->ParentNode->HostWindow; + node->AutorityForPos = node->AutorityForSize = node->AutorityForViewport = ImGuiDataAutority_Auto; } - node->AutorityForPos = node->AutorityForSize = node->AutorityForViewport = ImGuiDataAutority_Auto; if (node->WantMouseMove && node->HostWindow) DockNodeStartMouseMovingWindow(node, node->HostWindow); }