on xenial help sign in
fix focus when coming from greeter
d97e969Lukáš Tinkl
qml/Components/Lockscreen.qml+2
@@ -69,6 +69,8 @@ Showable {
69 signal emergencyCall()
69 signal emergencyCall()
70 signal infoPopupConfirmed()
70 signal infoPopupConfirmed()
71
71
72+ onActiveFocusChanged: if (activeFocus && pinPadLoader.item) pinPadLoader.item.forceActiveFocus()
73+
72 function reset() {
74 function reset() {
73 // This causes the loader below to destry and recreate the source
75 // This causes the loader below to destry and recreate the source
74 pinPadLoader.resetting = true;
76 pinPadLoader.resetting = true;
qml/Greeter/NarrowView.qml+12
@@ -125,6 +125,18 @@ FocusScope {
125 onCancel: coverPage.show()
125 onCancel: coverPage.show()
126 onEmergencyCall: root.emergencyCall()
126 onEmergencyCall: root.emergencyCall()
127
127
128+ onEnabledChanged: {
129+ if (enabled) {
130+ lockscreen.forceActiveFocus();
131+ }
132+ }
133+
134+ onVisibleChanged: {
135+ if (visible) {
136+ lockscreen.forceActiveFocus();
137+ }
138+ }
139+
128 function maybeShow() {
140 function maybeShow() {
129 if (root.locked && !shown) {
141 if (root.locked && !shown) {
130 showNow();
142 showNow();