Nav: fixed another occurence of nav cursor briefly appearing when Tabbing with ImGuiConfigFlags_NavEnableKeyboard disabled. (#9214, #9218)

Amend 1566c96cc + ea83628.
This commit is contained in:
ocornut
2026-02-10 22:04:15 +01:00
parent 87262dd07a
commit 7b365fa6b4

View File

@@ -12970,6 +12970,10 @@ void ImGui::SetNavCursorVisibleAfterMove()
ImGuiContext& g = *GImGui;
if (g.NavWindow && (g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs))
g.NavCursorVisible = false;
else if (g.NavInputSource == ImGuiInputSource_Keyboard && (g.IO.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) == 0)
g.NavCursorVisible = false;
else if (g.NavInputSource == ImGuiInputSource_Gamepad && (g.IO.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0)
g.NavCursorVisible = false;
else if (g.IO.ConfigNavCursorVisibleAuto)
g.NavCursorVisible = true;
g.NavHighlightItemUnderNav = g.NavMousePosDirty = true;