MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / AddFocusEvent

Method AddFocusEvent

TheForceEngine/TFE_Ui/imGUI/imgui.cpp:1734–1750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1732}
1733
1734void ImGuiIO::AddFocusEvent(bool focused)
1735{
1736 IM_ASSERT(Ctx != NULL);
1737 ImGuiContext& g = *Ctx;
1738
1739 // Filter duplicate
1740 const ImGuiInputEvent* latest_event = FindLatestInputEvent(&g, ImGuiInputEventType_Focus);
1741 const bool latest_focused = latest_event ? latest_event->AppFocused.Focused : !g.IO.AppFocusLost;
1742 if (latest_focused == focused || (ConfigDebugIgnoreFocusLoss && !focused))
1743 return;
1744
1745 ImGuiInputEvent e;
1746 e.Type = ImGuiInputEventType_Focus;
1747 e.EventId = g.InputEventsNextEventId++;
1748 e.AppFocused.Focused = focused;
1749 g.InputEventsQueue.push_back(e);
1750}
1751
1752//-----------------------------------------------------------------------------
1753// [SECTION] MISC HELPERS/UTILITIES (Geometry functions)

Callers 1

Calls 2

FindLatestInputEventFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected