MCPcopy Create free account
hub / github.com/Wemino/EchoPatch / IsPopupOpenRequestForWindow

Method IsPopupOpenRequestForWindow

include/imgui/imgui.cpp:12519–12530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12517}
12518
12519bool ImGui::IsPopupOpenRequestForWindow(ImGuiPopupFlags popup_flags)
12520{
12521 ImGuiContext& g = *GImGui;
12522 ImGuiMouseButton mouse_button = GetMouseButtonFromPopupFlags(popup_flags);
12523 if (IsMouseReleased(mouse_button) && IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
12524 if (!(popup_flags & ImGuiPopupFlags_NoOpenOverItems) || !IsAnyItemHovered())
12525 return true;
12526 if (g.NavOpenContextMenuWindowId && g.CurrentWindow->ID)
12527 if (IsWindowChildOf(g.NavWindow, g.CurrentWindow, false)) // This enable ordering to be used to disambiguate item vs window (#8803)
12528 return true;
12529 return false;
12530}
12531
12532// Helper to open a popup if mouse button is released over the item
12533// - 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