@@ -211,16 +211,10 @@ FocusScope {
212 contentScale: 1.0 - 0.2 * disappearingAnimationProgress
212 contentScale: 1.0 - 0.2 * disappearingAnimationProgress
213 opacity: 1.0 - disappearingAnimationProgress
213 opacity: 1.0 - disappearingAnimationProgress
214− property real disappearingAnimationProgress: {
214+ property real disappearingAnimationProgress: stagesOuterContainer.showProgress
215− if (greeter.shown) {
216− return greeter.showProgress;
218− return stagesOuterContainer.showProgress;
222− // FIXME: only necessary because stagesOuterContainer.showProgress and
216+ // FIXME: only necessary because stagesOuterContainer.showProgress
223− // greeterRevealer.animatedProgress are not animated
217+ // is not animated
224 Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
218 Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
@@ -453,90 +447,94 @@ FocusScope {
456− Greeter {
450+ Item {
457− id: greeter
451+ // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
458− objectName: "greeter"
452+ width: parent.width
453+ height: parent.height
454+ x: launcher.progress
455+ Behavior on x {SmoothedAnimation{velocity: 600}}
460− available: true
457+ Greeter {
461− hides: [launcher, panel.indicators, hud]
458+ id: greeter
462− shown: true
459+ objectName: "greeter"
464− defaultBackground: shell.background
461+ available: true
462+ hides: [launcher, panel.indicators, hud]
466− y: panel.panelHeight
465+ defaultBackground: shell.background
468− height: parent.height - panel.panelHeight
470− dragHandleWidth: shell.edgeSize
467+ y: panel.panelHeight
469+ height: parent.height - panel.panelHeight
472− property var previousMainApp: null
471+ dragHandleWidth: shell.edgeSize
473− property var previousSideApp: null
475− function removeApplicationFocus() {
473+ property var previousMainApp: null
476− greeter.previousMainApp = applicationManager.mainStageFocusedApplication;
474+ property var previousSideApp: null
477− greeter.previousSideApp = applicationManager.sideStageFocusedApplication;
478− applicationManager.unfocusCurrentApplication();
481− function restoreApplicationFocus() {
476+ function removeApplicationFocus() {
482− if (greeter.previousMainApp) {
477+ greeter.previousMainApp = applicationManager.mainStageFocusedApplication;
483− applicationManager.focusApplication(greeter.previousMainApp);
478+ greeter.previousSideApp = applicationManager.sideStageFocusedApplication;
484− greeter.previousMainApp = null;
479+ applicationManager.unfocusCurrentApplication();
486− if (greeter.previousSideApp) {
487− applicationManager.focusApplication(greeter.previousSideApp);
488− greeter.previousSideApp = null;
492− onShownChanged: {
482+ function restoreApplicationFocus() {
493− if (shown) {
483+ if (greeter.previousMainApp) {
494− lockscreen.reset();
484+ applicationManager.focusApplication(greeter.previousMainApp);
495− // If there is only one user, we start authenticating with that one here.
485+ greeter.previousMainApp = null;
496− // If there are more users, the Greeter will handle that
486+ }
497− if (LightDM.Users.count == 1) {
487+ if (greeter.previousSideApp) {
498− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
488+ applicationManager.focusApplication(greeter.previousSideApp);
489+ greeter.previousSideApp = null;
500− greeter.forceActiveFocus();
501− removeApplicationFocus();
503− restoreApplicationFocus();
507− onUnlocked: greeter.hide()
493+ onShownChanged: {
508− onSelected: {
494+ if (shown) {
509− // Update launcher items for new user
495+ lockscreen.reset();
496+ // If there is only one user, we start authenticating with that one here.
497+ // If there are more users, the Greeter will handle that
498+ if (LightDM.Users.count == 1) {
510− var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
499+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
511− AccountsService.user = user;
500+ }
512− LauncherModel.setUser(user);
501+ greeter.forceActiveFocus();
502+ removeApplicationFocus();
504+ restoreApplicationFocus();
515− onLeftTeaserPressedChanged: {
508+ onUnlocked: greeter.hide()
516− if (leftTeaserPressed) {
509+ onSelected: {
517− launcher.tease();
510+ // Update launcher items for new user
511+ var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
512+ AccountsService.user = user;
513+ LauncherModel.setUser(user);
516+ onTease: launcher.tease() //launcher.state = "visible"
521− Connections {
518+ Connections {
522− target: applicationManager
519+ target: applicationManager
523− ignoreUnknownSignals: true
520+ ignoreUnknownSignals: true
524− // If any app is focused when greeter is open, it's due to a user action
521+ // If any app is focused when greeter is open, it's due to a user action
525− // like a snap decision (say, an incoming call).
522+ // like a snap decision (say, an incoming call).
526− // TODO: these should be protected to only unlock for certain applications / certain usecases
523+ // TODO: these should be protected to only unlock for certain applications / certain usecases
527− // potentially only in connection with a notification.
524+ // potentially only in connection with a notification.
528− onMainStageFocusedApplicationChanged: {
525+ onMainStageFocusedApplicationChanged: {
529− if (greeter.shown && applicationManager.mainStageFocusedApplication) {
526+ if (greeter.shown && applicationManager.mainStageFocusedApplication) {
530− greeter.previousMainApp = null // make way for new focused app
527+ greeter.previousMainApp = null // make way for new focused app
531− greeter.previousSideApp = null
528+ greeter.previousSideApp = null
532− greeter.hide()
529+ greeter.hide()
535− onSideStageFocusedApplicationChanged: {
532+ onSideStageFocusedApplicationChanged: {
536− if (greeter.shown && applicationManager.sideStageFocusedApplication) {
533+ if (greeter.shown && applicationManager.sideStageFocusedApplication) {
537− greeter.previousMainApp = null // make way for new focused app
534+ greeter.previousMainApp = null // make way for new focused app
538− greeter.previousSideApp = null
535+ greeter.previousSideApp = null
539− greeter.hide()
536+ greeter.hide()
@@ -681,6 +679,8 @@ FocusScope {
681 stages.hide();
679 stages.hide();
682 launcher.hide();
680 launcher.hide();
683+ greeter.hideRight();
685 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
685 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
686 onLauncherApplicationSelected:{
686 onLauncherApplicationSelected:{