@@ -48,6 +48,9 @@ QtObject {
48 nextIndex = currentKeymapIndex + 1;
48 nextIndex = currentKeymapIndex + 1;
50 currentKeymapIndex = nextIndex;
50 currentKeymapIndex = nextIndex;
51+ if (actionGroup.currentAction.valid) {
52+ actionGroup.currentAction.updateState(currentKeymapIndex);
53 function previousKeymap() {
56 function previousKeymap() {
@@ -57,6 +60,9 @@ QtObject {
57 prevIndex = currentKeymapIndex - 1;
60 prevIndex = currentKeymapIndex - 1;
59 currentKeymapIndex = prevIndex;
62 currentKeymapIndex = prevIndex;
63+ if (actionGroup.currentAction.valid) {
64+ actionGroup.currentAction.updateState(currentKeymapIndex);
62 property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
68 property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
@@ -77,18 +83,12 @@ QtObject {
77 busName: "com.canonical.indicator.keyboard"
83 busName: "com.canonical.indicator.keyboard"
78 objectPath: "/com/canonical/indicator/keyboard"
84 objectPath: "/com/canonical/indicator/keyboard"
80− property variant currentAction: action("current")
86+ property variant currentAction: action("current") // the one that's checked by the indicator
81− property variant activeAction: action("active")
87+ property variant activeAction: action("active") // the one that we clicked
83 Component.onCompleted: actionGroup.start();
89 Component.onCompleted: actionGroup.start();
86− onCurrentKeymapIndexChanged: {
87− if (actionGroup.currentAction.valid) {
88− actionGroup.currentAction.updateState(currentKeymapIndex);
92 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1
92 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1
94 onActiveActionStateChanged: {
94 onActiveActionStateChanged: {