Skip to content

Commit

Permalink
Docking: Fixed a bug undocking windows docked into a non-visible or _…
Browse files Browse the repository at this point in the history
…KeepAliveOnly dockspace. (#4757)
  • Loading branch information
ocornut committed Nov 24, 2021
1 parent ea83d04 commit 719d931
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ Other Changes:
Docking+Viewports Branch:

- Docking: Revert removal of io.ConfigDockingWithShift config option (removed in 1.83). (#4643)
- Docking: Fixed a bug undocking windows docked into a non-visible or _KeepAliveOnly dockspace
when unrelated windows submitted before the dockspace have dynamic visibility. (#4757)
- Viewports: Made it possible to explicitly assign ImGuiWindowClass::ParentViewportId to 0 in order
to ensure a window is not parented. Previously this would use the global default (which might be 0,
but not always as it would depend on io.ConfigViewportsNoDefaultParent). (#3152, #2871)
Expand Down
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16157,7 +16157,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open)
node->State = ImGuiDockNodeState_HostWindowVisible;

// Undock if we are submitted earlier than the host window
if (window->BeginOrderWithinContext < node->HostWindow->BeginOrderWithinContext)
if (!(node->MergedFlags & ImGuiDockNodeFlags_KeepAliveOnly) && window->BeginOrderWithinContext < node->HostWindow->BeginOrderWithinContext)
{
DockContextProcessUndockWindow(ctx, window);
return;
Expand Down

0 comments on commit 719d931

Please sign in to comment.