From e6f06627e9cc7b47b4b428f15dc6d4c1910e7a18 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 20 Oct 2017 16:13:13 +0200 Subject: [PATCH] Made the ImGuiWindowFlags_NoMove flag inherited from parent to child, so in a setup with RootWindow (no flag) -> Child (NoMove flag) -> SubChild (no flag) user won't be able to move the root window by clicking on SubChild. (#1381) --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index e9619bac1..a65cf90c2 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3785,6 +3785,7 @@ static bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b { ImGuiWindow* parent_window = ImGui::GetCurrentWindow(); ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_ChildWindow; + flags |= (parent_window->Flags & ImGuiWindowFlags_NoMove); // Inherit the NoMove flag const ImVec2 content_avail = ImGui::GetContentRegionAvail(); ImVec2 size = ImFloor(size_arg);