MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / BringWindowToDisplayFront

Method BringWindowToDisplayFront

imgui_tiny_app/imgui/imgui.cpp:13585–13598  ·  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

13583// Note technically focus related but rather adjacent and close to BringWindowToFocusFront()
13584// FIXME-FOCUS: Could opt-in/opt-out enable modal check like in FocusWindow().
13585void ImGui::BringWindowToDisplayFront(ImGuiWindow* window)
13586{
13587 ImGuiContext& g = *GImGui;
13588 ImGuiWindow* current_front_window = g.Windows.back();
13589 if (current_front_window == window || current_front_window->RootWindowDockTree == window) // Cheap early out (could be better)
13590 return;
13591 for (int i = g.Windows.Size - 2; i >= 0; i--) // We can ignore the top-most window
13592 if (g.Windows[i] == window)
13593 {
13594 memmove(&g.Windows[i], &g.Windows[i + 1], (size_t)(g.Windows.Size - i - 1) * sizeof(ImGuiWindow*));
13595 g.Windows[g.Windows.Size - 1] = window;
13596 break;
13597 }
13598}
13599
13600void ImGui::BringWindowToDisplayBack(ImGuiWindow* window)
13601{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected