@@ -34,6 +34,7 @@ Showable {
34 // 1 when fully shown and 0 when fully hidden
34 // 1 when fully shown and 0 when fully hidden
35 readonly property real showProgress: MathUtils.clamp((width - Math.abs(greeterContentLoader.x)) / width, 0, 1)
35 readonly property real showProgress: MathUtils.clamp((width - Math.abs(greeterContentLoader.x)) / width, 0, 1)
36 readonly property bool fullyShown: showProgress === 1 || lockscreen.shown
36 readonly property bool fullyShown: showProgress === 1 || lockscreen.shown
37+ readonly property bool semiShown: shown || lockscreen.shown
38 // True when the greeter is waiting for PAM or other setup process
39 // True when the greeter is waiting for PAM or other setup process
39 property bool waiting: true
40 property bool waiting: true
@@ -52,8 +53,6 @@ Showable {
52 readonly property bool narrowMode: !multiUser && !tabletMode
53 readonly property bool narrowMode: !multiUser && !tabletMode
53 readonly property bool multiUser: LightDM.Users.count > 1
54 readonly property bool multiUser: LightDM.Users.count > 1
55− readonly property int currentIndex: greeterContentLoader.currentIndex
57 property real dragOffset
56 property real dragOffset
59 // We define a proxy and "is valid" property for launcherOffset because of
58 // We define a proxy and "is valid" property for launcherOffset because of
@@ -149,7 +148,7 @@ Showable {
149 waiting = true;
148 waiting = true;
151 if (narrowMode) {
150 if (narrowMode) {
152− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
151+ d.selectUser(greeterContentLoader.currentIndex);
154 d.reset();
153 d.reset();
@@ -188,6 +187,7 @@ Showable {
188 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
187 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
189 AccountsService.user = user;
188 AccountsService.user = user;
190 LauncherModel.setUser(user);
189 LauncherModel.setUser(user);
190+ LightDM.Greeter.authenticate(user); // always resets auth state
193 function reset() {
193 function reset() {
@@ -264,12 +264,6 @@ Showable {
268− Component.onCompleted: {
269− if (greeter.narrowMode) {
270− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
275 Rectangle {
269 Rectangle {
@@ -359,28 +353,29 @@ Showable {
359 d.login();
353 d.login();
361 AccountsService.failedLogins++
355 AccountsService.failedLogins++
362− if (maxFailedLogins >= 2) { // require at least a warning
363− if (AccountsService.failedLogins === maxFailedLogins - 1) {
364− var title = lockscreen.alphaNumeric ?
365− i18n.tr("Sorry, incorrect passphrase.") :
366− i18n.tr("Sorry, incorrect passcode.")
367− var text = i18n.tr("This will be your last attempt.") + " " +
368− (lockscreen.alphaNumeric ?
369− i18n.tr("If passphrase is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted.") :
370− i18n.tr("If passcode is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted."))
371− lockscreen.showInfoPopup(title, text)
372− } else if (AccountsService.failedLogins >= maxFailedLogins) {
373− SystemImage.factoryReset() // Ouch!
376− if (failedLoginsDelayAttempts > 0 && AccountsService.failedLogins % failedLoginsDelayAttempts == 0) {
377− lockscreen.delayMinutes = failedLoginsDelayMinutes
378− forcedDelayTimer.start()
381− lockscreen.clear(true);
382 if (greeter.narrowMode) {
357 if (greeter.narrowMode) {
383− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
358+ if (maxFailedLogins >= 2) { // require at least a warning
359+ if (AccountsService.failedLogins === maxFailedLogins - 1) {
360+ var title = lockscreen.alphaNumeric ?
361+ i18n.tr("Sorry, incorrect passphrase.") :
362+ i18n.tr("Sorry, incorrect passcode.")
363+ var text = i18n.tr("This will be your last attempt.") + " " +
364+ (lockscreen.alphaNumeric ?
365+ i18n.tr("If passphrase is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted.") :
366+ i18n.tr("If passcode is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted."))
367+ lockscreen.showInfoPopup(title, text)
368+ } else if (AccountsService.failedLogins >= maxFailedLogins) {
369+ SystemImage.factoryReset() // Ouch!
372+ if (failedLoginsDelayAttempts > 0 && AccountsService.failedLogins % failedLoginsDelayAttempts == 0) {
373+ lockscreen.delayMinutes = failedLoginsDelayMinutes
374+ forcedDelayTimer.start()
377+ lockscreen.clear(true);
378+ d.selectUser(greeterContentLoader.currentIndex);
@@ -389,6 +384,6 @@ Showable {
389 Binding {
384 Binding {
390 target: LightDM.Greeter
385 target: LightDM.Greeter
391 property: "active"
386 property: "active"
392− value: greeter.fullyShown || greeter.hasLockedApp
387+ value: greeter.semiShown || greeter.hasLockedApp