MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / BringWindowToDisplayFront

Method BringWindowToDisplayFront

include/imgui/imgui.cpp:12956–12969  ·  view source on GitHub ↗

Note technically focus related but rather adjacent and close to BringWindowToFocusFront() FIXME-FOCUS: Could opt-in/opt-out enable modal check like in FocusWindow().

Source from the content-addressed store, hash-verified

12954// Note technically focus related but rather adjacent and close to BringWindowToFocusFront()
12955// FIXME-FOCUS: Could opt-in/opt-out enable modal check like in FocusWindow().
12956void ImGui::BringWindowToDisplayFront(ImGuiWindow* window)
12957{
12958 ImGuiContext& g = *GImGui;
12959 ImGuiWindow* current_front_window = g.Windows.back();
12960 if (current_front_window == window || current_front_window->RootWindow == window) // Cheap early out (could be better)
12961 return;
12962 for (int i = g.Windows.Size - 2; i >= 0; i--) // We can ignore the top-most window
12963 if (g.Windows[i] == window)
12964 {
12965 memmove(&g.Windows[i], &g.Windows[i + 1], (size_t)(g.Windows.Size - i - 1) * sizeof(ImGuiWindow*));
12966 g.Windows[g.Windows.Size - 1] = window;
12967 break;
12968 }
12969}
12970
12971void ImGui::BringWindowToDisplayBack(ImGuiWindow* window)
12972{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected