on xenial help sign in
readd the surface binding, add extra guards, still not good :/
commit82925fd0a0394c61600acf1cbeb4735876447a25 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 30 Sep 2016, 01:06 (10 years ago) parent13d4c21
1 file changed+9−1
qml/Components/KeymapSwitcher.qml+9−1
qml/Components/KeymapSwitcher.qml+9−1
@@ -59,6 +59,12 @@ QtObject {
5959 currentKeymapIndex = prevIndex;
6060 }
6161
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+
6268 property Binding unityKeymapBinding: Binding {
6369 target: Mir
6470 property: "currentKeymap"
@@ -78,7 +84,9 @@ QtObject {
7884 }
7985
8086 onCurrentKeymapIndexChanged: {
81− actionGroup.currentAction.updateState(currentKeymapIndex);
87+ if (actionGroup.currentAction.valid) {
88+ actionGroup.currentAction.updateState(currentKeymapIndex);
89+ }
8290 }
8391
8492 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1