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

Method BringWindowToFocusFront

include/imgui/imgui.cpp:12933–12952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12931}
12932
12933void ImGui::BringWindowToFocusFront(ImGuiWindow* window)
12934{
12935 ImGuiContext& g = *GImGui;
12936 IM_ASSERT(window == window->RootWindow);
12937
12938 const int cur_order = window->FocusOrder;
12939 IM_ASSERT(g.WindowsFocusOrder[cur_order] == window);
12940 if (g.WindowsFocusOrder.back() == window)
12941 return;
12942
12943 const int new_order = g.WindowsFocusOrder.Size - 1;
12944 for (int n = cur_order; n < new_order; n++)
12945 {
12946 g.WindowsFocusOrder[n] = g.WindowsFocusOrder[n + 1];
12947 g.WindowsFocusOrder[n]->FocusOrder--;
12948 IM_ASSERT(g.WindowsFocusOrder[n]->FocusOrder == n);
12949 }
12950 g.WindowsFocusOrder[new_order] = window;
12951 window->FocusOrder = (short)new_order;
12952}
12953
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().

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected