mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Tidying up BeginMenu() code + comments.
This commit is contained in:
@ -7034,8 +7034,9 @@ void ImGui::ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to
|
||||
// Trim the stack when popups are not direct descendant of the reference window (the reference window is often the NavWindow)
|
||||
bool popup_or_descendent_is_ref_window = false;
|
||||
for (int m = popup_count_to_keep; m < g.OpenPopupStack.Size && !popup_or_descendent_is_ref_window; m++)
|
||||
if (g.OpenPopupStack[m].Window && g.OpenPopupStack[m].Window->RootWindow == ref_window->RootWindow)
|
||||
popup_or_descendent_is_ref_window = true;
|
||||
if (ImGuiWindow* popup_window = g.OpenPopupStack[m].Window)
|
||||
if (popup_window->RootWindow == ref_window->RootWindow)
|
||||
popup_or_descendent_is_ref_window = true;
|
||||
if (!popup_or_descendent_is_ref_window)
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user