From 664fb38e399bd4b86f4adf75fb260b74fd8909ac Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 25 Oct 2019 11:13:51 +0200 Subject: [PATCH] Docking: child windows don't use style.ChildRounding. --- imgui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 48831461..731bb0bd 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6088,9 +6088,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->Pos = ImFloor(window->Pos); // Lock window rounding for the frame (so that altering them doesn't cause inconsistencies) - window->WindowRounding = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildRounding : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding; - if (window->ViewportOwned) + if (window->ViewportOwned || window->DockIsActive) window->WindowRounding = 0.0f; + else + window->WindowRounding = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildRounding : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding; // Apply window focus (new and reactivated windows are moved to front) bool want_focus = false;