aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/main.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/main.vala b/lib/main.vala
index 877d7b7b..d3e063d1 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -897,6 +897,13 @@ public class Indicator.Keyboard.Service : Object {
jump = sources.length - jump;
}
+ /*
+ * We need to cycle through offset valid input sources, skipping those that aren't
+ * valid for this session (i.e. skipping Fcitx ones if IBus is active and vice-versa.
+ * jump is the direction we need to cycle in, which is 1 if we want to cycle forward
+ * and -1 (mod sources.length) if we want to cycle backward.
+ */
+
for (; offset > 0; offset--) {
do {
current = (current + jump) % sources.length;