MCPcopy Create free account
hub / github.com/RenderKit/embree / AddFocusEvent

Method AddFocusEvent

tutorials/common/imgui/imgui.cpp:1480–1495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1478}
1479
1480void ImGuiIO::AddFocusEvent(bool focused)
1481{
1482 ImGuiContext& g = *GImGui;
1483 IM_ASSERT(&g.IO == this && "Can only add events to current context.");
1484
1485 // Filter duplicate
1486 const ImGuiInputEvent* latest_event = FindLatestInputEvent(ImGuiInputEventType_Focus);
1487 const bool latest_focused = latest_event ? latest_event->AppFocused.Focused : !g.IO.AppFocusLost;
1488 if (latest_focused == focused)
1489 return;
1490
1491 ImGuiInputEvent e;
1492 e.Type = ImGuiInputEventType_Focus;
1493 e.AppFocused.Focused = focused;
1494 g.InputEventsQueue.push_back(e);
1495}
1496
1497//-----------------------------------------------------------------------------
1498// [SECTION] MISC HELPERS/UTILITIES (Geometry functions)

Callers 1

Calls 2

FindLatestInputEventFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected