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