MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / AddFocusEvent

Method AddFocusEvent

KBotExt/imgui/imgui.cpp:1584–1600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1582}
1583
1584void ImGuiIO::AddFocusEvent(bool focused)
1585{
1586 IM_ASSERT(Ctx != NULL);
1587 ImGuiContext& g = *Ctx;
1588
1589 // Filter duplicate
1590 const ImGuiInputEvent* latest_event = FindLatestInputEvent(&g, ImGuiInputEventType_Focus);
1591 const bool latest_focused = latest_event ? latest_event->AppFocused.Focused : !g.IO.AppFocusLost;
1592 if (latest_focused == focused || (ConfigDebugIgnoreFocusLoss && !focused))
1593 return;
1594
1595 ImGuiInputEvent e;
1596 e.Type = ImGuiInputEventType_Focus;
1597 e.EventId = g.InputEventsNextEventId++;
1598 e.AppFocused.Focused = focused;
1599 g.InputEventsQueue.push_back(e);
1600}
1601
1602//-----------------------------------------------------------------------------
1603// [SECTION] MISC HELPERS/UTILITIES (Geometry functions)

Callers 1

Calls 1

FindLatestInputEventFunction · 0.85

Tested by

no test coverage detected