on xenial help sign in
readd the surface binding, add extra guards, still not good :/
82925fdLukáš Tinkl
qml/Components/KeymapSwitcher.qml+9−1
@@ -59,6 +59,12 @@ QtObject {
59 currentKeymapIndex = prevIndex;
59 currentKeymapIndex = prevIndex;
60 }
60 }
61
61
62+ property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
63+ target: MirFocusController.focusedSurface
64+ property: "keymap"
65+ value: root.currentKeymap
66+ }
67+
62 property Binding unityKeymapBinding: Binding {
68 property Binding unityKeymapBinding: Binding {
63 target: Mir
69 target: Mir
64 property: "currentKeymap"
70 property: "currentKeymap"
@@ -78,7 +84,9 @@ QtObject {
78 }
84 }
79
85
80 onCurrentKeymapIndexChanged: {
86 onCurrentKeymapIndexChanged: {
87+ if (actionGroup.currentAction.valid) {
81− actionGroup.currentAction.updateState(currentKeymapIndex);
88+ actionGroup.currentAction.updateState(currentKeymapIndex);
89+ }
82 }
90 }
83
91
84 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1
92 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1