Skip to content

Commit

Permalink
Popups & Modals: Fix somehow undocumented Popup+Child behavior (usefu…
Browse files Browse the repository at this point in the history
…l for e.g. #718, #4461 and probably other things)

(broken by 1c4066c)
  • Loading branch information
ocornut committed Sep 16, 2022
1 parent 440f257 commit 66bae60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
const bool child_flag_changed = new_is_explicit_child != window->IsExplicitChild;
if ((just_created || child_flag_changed) && !new_is_explicit_child)
{
Expand Down

0 comments on commit 66bae60

Please sign in to comment.