From 7d81a166f92ea583b9d50b640d73394a7932ad4a Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 23 Jun 2023 15:47:34 +0200 Subject: [PATCH] Docking: Fixed one-frame flickering on reappearing windows binding to a dock node where a later-submitted window was already bound. --- docs/CHANGELOG.txt | 2 ++ imgui.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index cef298627..7907226b9 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -153,6 +153,8 @@ Docking+Viewports Branch: - Viewports: Closing a viewport via OS/platform means (e.g. OS close button or task-bar menu), mark all windows in this viewport as closed. +- Docking: Fixed one-frame flickering on reappearing windows binding to a dock node + where a later-submitted window was already bound. - Docking: Fixed dragging from title-bar empty space (regression from 1.88 related to keeping ID alive when calling low-level ButtonBehavior() directly). (#5181, #2645) - Docking: [Internal] DockBuilderDockWindow() API calls don't clear docking order diff --git a/imgui.cpp b/imgui.cpp index 339f47229..8763aa528 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -18407,7 +18407,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) { if (node->State == ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing) window->DockIsActive = true; - if (node->Windows.Size > 1) + if (node->Windows.Size > 1 && window->Appearing) // Only hide appearing window DockNodeHideWindowDuringHostWindowCreation(window); return; }