From 1dd964f87dc1ea0a76b137baf3401bd201fc2012 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 16 Sep 2022 22:25:20 +0200 Subject: [PATCH] Popups & Modals: Fix (amended) somehow undocumented Popup+Child behavior (useful for e.g. #718, #4461 and probably other things) (broken by 1c4066cd) --- imgui.cpp | 2 +- imgui.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index a4322bdf7c5e..5cc6ca25dead 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5511,7 +5511,7 @@ static void UpdateWindowInFocusOrderList(ImGuiWindow* window, bool just_created, { ImGuiContext& g = *GImGui; - const bool new_is_explicit_child = (new_flags & ImGuiWindowFlags_ChildWindow) != 0; + const bool new_is_explicit_child = (new_flags & ImGuiWindowFlags_ChildWindow) != 0 && ((new_flags & ImGuiWindowFlags_Popup) == 0 || (new_flags & ImGuiWindowFlags_ChildMenu) != 0); const bool child_flag_changed = new_is_explicit_child != window->IsExplicitChild; if ((just_created || child_flag_changed) && !new_is_explicit_child) { diff --git a/imgui.h b/imgui.h index 552a5f598bf2..2f151657305d 100644 --- a/imgui.h +++ b/imgui.h @@ -23,7 +23,7 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345') #define IMGUI_VERSION "1.89 WIP" -#define IMGUI_VERSION_NUM 18820 +#define IMGUI_VERSION_NUM 18821 #define IMGUI_HAS_TABLE /*