From ca0ea7af57d733ec920770e18e760691630be2ca Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 11 May 2026 15:52:38 -0400 Subject: [PATCH] Clamp image selector navigation --- default/quickshell/background-switcher.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/default/quickshell/background-switcher.qml b/default/quickshell/background-switcher.qml index e63b6f49..1e3ba1e3 100644 --- a/default/quickshell/background-switcher.qml +++ b/default/quickshell/background-switcher.qml @@ -56,8 +56,9 @@ ShellRoot { function select(index, immediate) { if (imageModel.count === 0) return - if (index < 0) index = imageModel.count - 1 - else if (index >= imageModel.count) index = 0 + if (index < 0) index = 0 + else if (index >= imageModel.count) index = imageModel.count - 1 + if (index === selectedIndex && immediate !== true) return animateSelection = immediate !== true selectedIndex = index