on xenial help sign in
Fix lockscreen appearing right after unlocking a locked session on the desktop. (LP: #1604374)

Approved by: Josh Arenson

commit79a5f8d71eee94a3ea17c863c360822a290b17f2 authorMichael Terry <michael.terry@canonical.com> dateWed 3 Aug 2016, 15:53 (10 years ago) parenta90fac4977739c
1 file changed+9−3
qml/Greeter/Greeter.qml+9−3
qml/Greeter/Greeter.qml+9−3
@@ -76,9 +76,16 @@ Showable {
7676 // already shown, do it manually.
7777 d.selectUser(d.currentIndex, true);
7878 }
79+
7980 // Even though we may already be shown, we want to call show() for its
8081 // possible side effects, like hiding indicators and such.
81− showNow();
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) {
87+ showNow();
88+ }
8289 }
8390
8491 function notifyAppFocusRequested(appId) {
@@ -427,8 +434,7 @@ Showable {
427434 target: LightDMService.greeter
428435
429436 onShowGreeter: root.forceShow()
430−
431− onHideGreeter: d.login()
437+ onHideGreeter: root.forcedUnlock = true
432438
433439 onShowMessage: {
434440 // inefficient, but we only rarely deal with messages