on xenial help sign in
fix focus when coming from greeter
commitd97e969f72144864adaf1d35906aa689072da2fd authorLukáš Tinkl <lukas.tinkl@canonical.com> dateTue 1 Mar 2016, 15:49 (11 years ago) parentb90d9ec
2 files changed+14
qml/Components/Lockscreen.qml+2 qml/Greeter/NarrowView.qml+12
qml/Components/Lockscreen.qml+2
@@ -69,6 +69,8 @@ Showable {
6969 signal emergencyCall()
7070 signal infoPopupConfirmed()
7171
72+ onActiveFocusChanged: if (activeFocus && pinPadLoader.item) pinPadLoader.item.forceActiveFocus()
73+
7274 function reset() {
7375 // This causes the loader below to destry and recreate the source
7476 pinPadLoader.resetting = true;
qml/Greeter/NarrowView.qml+12
@@ -125,6 +125,18 @@ FocusScope {
125125 onCancel: coverPage.show()
126126 onEmergencyCall: root.emergencyCall()
127127
128+ onEnabledChanged: {
129+ if (enabled) {
130+ lockscreen.forceActiveFocus();
131+ }
132+ }
133+
134+ onVisibleChanged: {
135+ if (visible) {
136+ lockscreen.forceActiveFocus();
137+ }
138+ }
139+
128140 function maybeShow() {
129141 if (root.locked && !shown) {
130142 showNow();