From 70f83a3a65353abdcb155f32d742e676a6f6d4e8 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 15 May 2015 20:35:28 +0100 Subject: [PATCH] Popups: child popups (menus) hidden on their first frame the same way as regular popup --- imgui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index d93040e7..14b1c5a9 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1776,8 +1776,11 @@ static void AddWindowToRenderList(ImVector& out_render_list, ImGuiW for (size_t i = 0; i < window->DC.ChildWindows.size(); i++) { ImGuiWindow* child = window->DC.ChildWindows[i]; - if (child->Active) // clipped children may have been marked not active - AddWindowToRenderList(out_render_list, child); + if (!child->Active) // clipped children may have been marked not active + continue; + if ((child->Flags & ImGuiWindowFlags_Popup) && child->HiddenFrames > 0) + continue; + AddWindowToRenderList(out_render_list, child); } }