@@ -67,7 +67,7 @@ FocusScope {
69 readonly property bool fullscreenMode: {
69 readonly property bool fullscreenMode: {
70− if (greeter.shown) {
70+ if (greeter.shown || lockscreen.shown) {
71 return false;
71 return false;
72 } else if (mainStage.usingScreenshots) { // Window Manager animating so want to re-evaluate fullscreen mode
72 } else if (mainStage.usingScreenshots) { // Window Manager animating so want to re-evaluate fullscreen mode
73 return mainStage.switchingFromFullscreenToFullscreen;
73 return mainStage.switchingFromFullscreenToFullscreen;
@@ -124,7 +124,6 @@ FocusScope {
126 id: underlay
126 id: underlay
128 anchors.fill: parent
127 anchors.fill: parent
129 visible: !(panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
128 visible: !(panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
130 && (stages.fullyHidden
129 && (stages.fullyHidden
@@ -148,7 +147,7 @@ FocusScope {
151− available: !greeter.shown
150+ available: !greeter.shown && !lockscreen.shown
152 hides: [stages, launcher, panel.indicators]
151 hides: [stages, launcher, panel.indicators]
153 shown: disappearingAnimationProgress !== 1.0
152 shown: disappearingAnimationProgress !== 1.0
154 enabled: disappearingAnimationProgress === 0.0
153 enabled: disappearingAnimationProgress === 0.0
@@ -301,7 +300,7 @@ FocusScope {
301 && sideStage[sideStageRevealer.boundProperty] == sideStageRevealer.openedValue
300 && sideStage[sideStageRevealer.boundProperty] == sideStageRevealer.openedValue
302 shouldUseScreenshots: !fullyShown || mainStage.usingScreenshots || sideStageRevealer.pressed
301 shouldUseScreenshots: !fullyShown || mainStage.usingScreenshots || sideStageRevealer.pressed
304− available: !greeter.shown && enabled
303+ available: !greeter.shown && !lockscreen.shown && enabled
305 hides: [launcher, panel.indicators]
304 hides: [launcher, panel.indicators]
306 shown: false
305 shown: false
307 showAnimation: StandardAnimation { property: "x"; duration: 350; to: sideStageRevealer.openedValue; easing.type: Easing.OutQuint }
306 showAnimation: StandardAnimation { property: "x"; duration: 350; to: sideStageRevealer.openedValue; easing.type: Easing.OutQuint }
@@ -352,6 +351,46 @@ FocusScope {
352 orientation: Qt.Horizontal
351 orientation: Qt.Horizontal
356+ hides: [launcher, panel.indicators, hud]
359+ showAnimation: StandardAnimation { property: "opacity"; to: 1 }
360+ hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
361+ y: panel.panelHeight
362+ x: required ? 0 : - width
364+ height: parent.height - panel.panelHeight
365+ background: shell.background
367+ onUnlocked: lockscreen.hide()
368+ onCancel: greeter.show()
370+ Component.onCompleted: {
371+ if (LightDM.Users.count == 1) {
372+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
378+ target: LightDM.Greeter
381+ if (LightDM.Users.count == 1) {
382+ // TODO: There's no better way for now to determine if its a PIN or a passphrase.
383+ if (text == "PIN") {
384+ lockscreen.alphaNumeric = false
386+ lockscreen.alphaNumeric = true
388+ lockscreen.placeholderText = i18n.tr("Please enter %1:").arg(text);
355 Greeter {
394 Greeter {
356 id: greeter
395 id: greeter
@@ -360,7 +399,6 @@ FocusScope {
360 shown: true
399 shown: true
361 showAnimation: StandardAnimation { property: "x"; to: greeterRevealer.openedValue }
400 showAnimation: StandardAnimation { property: "x"; to: greeterRevealer.openedValue }
362 hideAnimation: StandardAnimation { property: "x"; to: greeterRevealer.closedValue }
401 hideAnimation: StandardAnimation { property: "x"; to: greeterRevealer.closedValue }
364 y: panel.panelHeight
402 y: panel.panelHeight
365 width: parent.width
403 width: parent.width
366 height: parent.height - panel.panelHeight
404 height: parent.height - panel.panelHeight
@@ -370,6 +408,12 @@ FocusScope {
371 onShownChanged: {
409 onShownChanged: {
372 if (shown) {
410 if (shown) {
412+ // If there is only one user, we start authenticating with that one here.
413+ // If there are more users, the Greeter will handle that
414+ if (LightDM.Users.count == 1) {
415+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
373 greeter.forceActiveFocus();
417 greeter.forceActiveFocus();
374 // FIXME: *FocusedApplication are not updated when unfocused, hence the need to check whether
418 // FIXME: *FocusedApplication are not updated when unfocused, hence the need to check whether
375 // the stage was actually shown
419 // the stage was actually shown
@@ -397,7 +441,7 @@ FocusScope {
398 InputFilterArea {
442 InputFilterArea {
399 anchors.fill: parent
443 anchors.fill: parent
400− blockInput: greeter.shown
444+ blockInput: greeter.shown || lockscreen.shown
403 Revealer {
447 Revealer {
@@ -426,7 +470,7 @@ FocusScope {
426 hides: [launcher]
470 hides: [launcher]
428 fullscreenMode: shell.fullscreenMode
472 fullscreenMode: shell.fullscreenMode
429− searchVisible: !greeter.shown
473+ searchVisible: !greeter.shown && !lockscreen.shown
431 InputFilterArea {
475 InputFilterArea {
432 anchors.fill: parent
476 anchors.fill: parent
@@ -440,7 +484,7 @@ FocusScope {
440 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
484 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
441 height: parent.height
485 height: parent.height
443− available: !greeter.shown && !panel.indicators.shown
487+ available: !greeter.shown && !panel.indicators.shown && !lockscreen.shown
444 shown: false
488 shown: false
445 showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
489 showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
446 hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
490 hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }