Note technically focus related but rather adjacent and close to BringWindowToFocusFront() FIXME-FOCUS: Could opt-in/opt-out enable modal check like in FocusWindow().
| 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(). |
| 12956 | void 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 | |
| 12971 | void ImGui::BringWindowToDisplayBack(ImGuiWindow* window) |
| 12972 | { |
nothing calls this directly
no outgoing calls
no test coverage detected