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

Function NavUpdateWindowingTarget

imgui_tiny_app/imgui/imgui.cpp:15189–15206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15187}
15188
15189static void NavUpdateWindowingTarget(int focus_change_dir)
15190{
15191 ImGuiContext& g = *GImGui;
15192 IM_ASSERT(g.NavWindowingTarget);
15193 if (g.NavWindowingTarget->Flags & ImGuiWindowFlags_Modal)
15194 return;
15195
15196 const int i_current = ImGui::FindWindowFocusIndex(g.NavWindowingTarget);
15197 ImGuiWindow* window_target = FindWindowNavFocusable(i_current + focus_change_dir, -INT_MAX, focus_change_dir);
15198 if (!window_target)
15199 window_target = FindWindowNavFocusable((focus_change_dir < 0) ? (g.WindowsFocusOrder.Size - 1) : 0, i_current, focus_change_dir);
15200 if (window_target) // Don't reset windowing target if there's a single window in the list
15201 {
15202 g.NavWindowingTarget = g.NavWindowingTargetAnim = window_target;
15203 g.NavWindowingAccumDeltaPos = g.NavWindowingAccumDeltaSize = ImVec2(0.0f, 0.0f);
15204 }
15205 g.NavWindowingToggleLayer = false;
15206}
15207
15208// Apply focus and close overlay
15209static void ImGui::NavUpdateWindowingApplyFocus(ImGuiWindow* apply_focus_window)

Callers 1

NavUpdateWindowingMethod · 0.85

Calls 2

FindWindowNavFocusableFunction · 0.85
ImVec2Function · 0.85

Tested by

no test coverage detected