MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / IsPopupOpenRequestForWindow

Method IsPopupOpenRequestForWindow

imgui_tiny_app/imgui/imgui.cpp:13227–13238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13225}
13226
13227bool ImGui::IsPopupOpenRequestForWindow(ImGuiPopupFlags popup_flags)
13228{
13229 ImGuiContext& g = *GImGui;
13230 ImGuiMouseButton mouse_button = GetMouseButtonFromPopupFlags(popup_flags);
13231 if (IsMouseReleased(mouse_button) && IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
13232 if (!(popup_flags & ImGuiPopupFlags_NoOpenOverItems) || !IsAnyItemHovered())
13233 return true;
13234 if (g.NavOpenContextMenuWindowId && g.CurrentWindow->ID)
13235 if (IsWindowChildOf(g.NavWindow, g.CurrentWindow, false, false)) // This enable ordering to be used to disambiguate item vs window (#8803)
13236 return true;
13237 return false;
13238}
13239
13240// Helper to open a popup if mouse button is released over the item
13241// - This is essentially the same as BeginPopupContextItem() but without the trailing BeginPopup()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected