mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-31 12:03:49 +01:00
Docking+Viewports: Fix undocking window node causing parent viewport to become unresponsive. (#5503)
Amend 67be485e, Somehow ties to 58f5092c + 0eb45a05 (#4310) Unsure of exact chain of event but this caused a parent link msimatch between the time of the MouseMoving test in AddUpdateViewport() setting _NoInputs on the wrong parent., and the release clearing _NoInputs on the rght one.
This commit is contained in:
parent
b12e056c21
commit
f573ebf31a
@ -146,6 +146,8 @@ Docking+Viewports Branch:
|
|||||||
- Docking: Fixed regression introduced in v1.87 when docked window content not rendered
|
- Docking: Fixed regression introduced in v1.87 when docked window content not rendered
|
||||||
while switching between with CTRL+Tab. [@rokups]
|
while switching between with CTRL+Tab. [@rokups]
|
||||||
- Docking: Fixed amending into an existing tab bar from rendering invisible items. (#5515)
|
- Docking: Fixed amending into an existing tab bar from rendering invisible items. (#5515)
|
||||||
|
- Docking+Viewports: Fixed undocking window node causing parent viewports to become unresponsive
|
||||||
|
in certain situation (e.g. hidden tab bar). (#5503) [@rokups]
|
||||||
- Backends: GLFW: Fixed leftover static variable preventing from changing or
|
- Backends: GLFW: Fixed leftover static variable preventing from changing or
|
||||||
reinitializing backend while application is running. (#4616, #5434) [@rtoumazet]
|
reinitializing backend while application is running. (#4616, #5434) [@rtoumazet]
|
||||||
|
|
||||||
|
16
imgui.cpp
16
imgui.cpp
@ -14460,14 +14460,6 @@ void ImGui::DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node)
|
|||||||
new_node->SizeRef = node->SizeRef;
|
new_node->SizeRef = node->SizeRef;
|
||||||
DockNodeMoveWindows(new_node, node);
|
DockNodeMoveWindows(new_node, node);
|
||||||
DockSettingsRenameNodeReferences(node->ID, new_node->ID);
|
DockSettingsRenameNodeReferences(node->ID, new_node->ID);
|
||||||
for (int n = 0; n < new_node->Windows.Size; n++)
|
|
||||||
{
|
|
||||||
ImGuiWindow* window = new_node->Windows[n];
|
|
||||||
window->Flags &= ~ImGuiWindowFlags_ChildWindow;
|
|
||||||
if (window->ParentWindow)
|
|
||||||
window->ParentWindow->DC.ChildWindows.find_erase(window);
|
|
||||||
UpdateWindowParentAndRootLinks(window, window->Flags, NULL);
|
|
||||||
}
|
|
||||||
node = new_node;
|
node = new_node;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -14480,6 +14472,14 @@ void ImGui::DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node)
|
|||||||
node->ParentNode->AuthorityForViewport = ImGuiDataAuthority_Window; // The node that stays in place keeps the viewport, so our newly dragged out node will create a new viewport
|
node->ParentNode->AuthorityForViewport = ImGuiDataAuthority_Window; // The node that stays in place keeps the viewport, so our newly dragged out node will create a new viewport
|
||||||
node->ParentNode = NULL;
|
node->ParentNode = NULL;
|
||||||
}
|
}
|
||||||
|
for (int n = 0; n < node->Windows.Size; n++)
|
||||||
|
{
|
||||||
|
ImGuiWindow* window = node->Windows[n];
|
||||||
|
window->Flags &= ~ImGuiWindowFlags_ChildWindow;
|
||||||
|
if (window->ParentWindow)
|
||||||
|
window->ParentWindow->DC.ChildWindows.find_erase(window);
|
||||||
|
UpdateWindowParentAndRootLinks(window, window->Flags, NULL);
|
||||||
|
}
|
||||||
node->AuthorityForPos = node->AuthorityForSize = ImGuiDataAuthority_DockNode;
|
node->AuthorityForPos = node->AuthorityForSize = ImGuiDataAuthority_DockNode;
|
||||||
node->Size = FixLargeWindowsWhenUndocking(node->Size, node->Windows[0]->Viewport);
|
node->Size = FixLargeWindowsWhenUndocking(node->Size, node->Windows[0]->Viewport);
|
||||||
node->WantMouseMove = true;
|
node->WantMouseMove = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user