on xenial help sign in
Fix race when unlocking
977739cMichael Terry
qml/Greeter/Greeter.qml+9−3
@@ -76,9 +76,16 @@ Showable {
76 // already shown, do it manually.
76 // already shown, do it manually.
77 d.selectUser(d.currentIndex, true);
77 d.selectUser(d.currentIndex, true);
78 }
78 }
79+
79 // Even though we may already be shown, we want to call show() for its
80 // Even though we may already be shown, we want to call show() for its
80 // possible side effects, like hiding indicators and such.
81 // possible side effects, like hiding indicators and such.
82+ //
83+ // We re-check forcedUnlock here, because selectUser above might
84+ // process events during authentication, and a request to unlock could
85+ // have come in in the meantime.
86+ if (!forcedUnlock) {
81− showNow();
87+ showNow();
88+ }
82 }
89 }
83
90
84 function notifyAppFocusRequested(appId) {
91 function notifyAppFocusRequested(appId) {
@@ -427,8 +434,7 @@ Showable {
427 target: LightDMService.greeter
434 target: LightDMService.greeter
428
435
429 onShowGreeter: root.forceShow()
436 onShowGreeter: root.forceShow()
430−
431− onHideGreeter: d.login()
437+ onHideGreeter: root.forcedUnlock = true
432
438
433 onShowMessage: {
439 onShowMessage: {
434 // inefficient, but we only rarely deal with messages
440 // inefficient, but we only rarely deal with messages