| 7217 | } |
| 7218 | |
| 7219 | void ImGui::FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window, ImGuiViewport* filter_viewport, ImGuiFocusRequestFlags flags) |
| 7220 | { |
| 7221 | ImGuiContext& g = *GImGui; |
| 7222 | IM_UNUSED(filter_viewport); // Unused in master branch. |
| 7223 | int start_idx = g.WindowsFocusOrder.Size - 1; |
| 7224 | if (under_this_window != NULL) |
| 7225 | { |
| 7226 | // Aim at root window behind us, if we are in a child window that's our own root (see #4640) |
| 7227 | int offset = -1; |
| 7228 | while (under_this_window->Flags & ImGuiWindowFlags_ChildWindow) |
| 7229 | { |
| 7230 | under_this_window = under_this_window->ParentWindow; |
| 7231 | offset = 0; |
| 7232 | } |
| 7233 | start_idx = FindWindowFocusIndex(under_this_window) + offset; |
| 7234 | } |
| 7235 | for (int i = start_idx; i >= 0; i--) |
| 7236 | { |
| 7237 | // We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user. |
| 7238 | ImGuiWindow* window = g.WindowsFocusOrder[i]; |
| 7239 | if (window == ignore_window || !window->WasActive) |
| 7240 | continue; |
| 7241 | if ((window->Flags & (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs)) != (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs)) |
| 7242 | { |
| 7243 | FocusWindow(window, flags); |
| 7244 | return; |
| 7245 | } |
| 7246 | } |
| 7247 | FocusWindow(NULL, flags); |
| 7248 | } |
| 7249 | |
| 7250 | // Important: this alone doesn't alter current ImDrawList state. This is called by PushFont/PopFont only. |
| 7251 | void ImGui::SetCurrentFont(ImFont* font) |
nothing calls this directly
no outgoing calls
no test coverage detected