@@ -137,7 +137,7 @@ FocusScope {
138 objectName: "dash"
138 objectName: "dash"
140− available: !greeter.shown && !lockscreen.shown
140+ available: !LightDM.Greeter.active
141 hides: [stages, launcher, panel.indicators]
141 hides: [stages, launcher, panel.indicators]
142 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
142 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
143 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
143 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
@@ -200,7 +200,7 @@ FocusScope {
202 if (shown) {
202 if (shown) {
203− if (overlayMode || locked) {
203+ if (overlayMode || locked || greeter.fakeActiveForApp !== "") {
204 return 0;
204 return 0;
206 return launcher.progress
206 return launcher.progress
@@ -245,10 +245,17 @@ FocusScope {
245 target: ApplicationManager
245 target: ApplicationManager
247 onFocusRequested: {
247 onFocusRequested: {
248+ if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
248 stages.show(true);
252 stages.show(true);
251 onFocusedApplicationIdChanged: {
255 onFocusedApplicationIdChanged: {
256+ if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
252 if (ApplicationManager.focusedApplicationId.length > 0) {
259 if (ApplicationManager.focusedApplicationId.length > 0) {
253 stages.show(false);
260 stages.show(false);
@@ -439,6 +446,11 @@ FocusScope {
440 source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
447 source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
450+ target: applicationsDisplayLoader.item
451+ property: "objectName"
442 Binding {
454 Binding {
443 target: applicationsDisplayLoader.item
455 target: applicationsDisplayLoader.item
444 property: "moving"
456 property: "moving"
@@ -454,6 +466,11 @@ FocusScope {
454 property: "dragAreaWidth"
466 property: "dragAreaWidth"
455 value: shell.edgeSize
467 value: shell.edgeSize
470+ target: applicationsDisplayLoader.item
471+ property: "spreadEnabled"
472+ value: greeter.fakeActiveForApp === "" // to support emergency dialer hack
@@ -478,6 +495,13 @@ FocusScope {
479 onEntered: LightDM.Greeter.respond(passphrase);
496 onEntered: LightDM.Greeter.respond(passphrase);
480 onCancel: greeter.show()
497 onCancel: greeter.show()
499+ greeter.fakeActiveForApp = "dialer-app"
500+ shell.activateApplication("dialer-app")
504+ onShownChanged: if (shown) greeter.fakeActiveForApp = ""
482 Component.onCompleted: {
506 Component.onCompleted: {
483 if (LightDM.Users.count == 1) {
507 if (LightDM.Users.count == 1) {
@@ -510,6 +534,7 @@ FocusScope {
511 if (LightDM.Greeter.authenticated) {
535 if (LightDM.Greeter.authenticated) {
512 lockscreen.hide();
536 lockscreen.hide();
514 lockscreen.clear(true);
539 lockscreen.clear(true);
@@ -519,7 +544,7 @@ FocusScope {
519 Binding {
544 Binding {
520 target: LightDM.Greeter
545 target: LightDM.Greeter
521 property: "active"
546 property: "active"
522− value: greeter.shown || lockscreen.shown
547+ value: greeter.shown || lockscreen.shown || greeter.fakeActiveForApp != ""
525 Rectangle {
550 Rectangle {
@@ -542,11 +567,16 @@ FocusScope {
544 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
569 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
570+ onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
546 Greeter {
572 Greeter {
547 id: greeter
573 id: greeter
548 objectName: "greeter"
574 objectName: "greeter"
576+ signal sessionStarted() // helpful for tests
578+ property string fakeActiveForApp: ""
550 available: true
580 available: true
551 hides: [launcher, panel.indicators]
581 hides: [launcher, panel.indicators]
552 shown: true
582 shown: true
@@ -558,6 +588,16 @@ FocusScope {
559 dragHandleWidth: shell.edgeSize
589 dragHandleWidth: shell.edgeSize
593+ LightDM.Greeter.startSessionSync();
561 onShownChanged: {
601 onShownChanged: {
562 if (shown) {
602 if (shown) {
563 lockscreen.reset();
603 lockscreen.reset();
@@ -569,6 +609,7 @@ FocusScope {
569 if (LightDM.Users.count == 1) {
609 if (LightDM.Users.count == 1) {
570 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
610 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
612+ greeter.fakeActiveForApp = "";
572 greeter.forceActiveFocus();
613 greeter.forceActiveFocus();
@@ -618,12 +659,40 @@ FocusScope {
620 function showHome() {
661 function showHome() {
662+ if (edgeDemo.running) {
666+ if (LightDM.Greeter.active) {
667+ if (!LightDM.Greeter.promptless) {
621− var animate = !greeter.shown && !stages.shown
673+ var animate = !LightDM.Greeter.active && !stages.shown
623 dash.setCurrentScope("clickscope", animate, false)
674 dash.setCurrentScope("clickscope", animate, false)
624 stages.hide()
675 stages.hide()
678+ function showDash() {
679+ if (LightDM.Greeter.active && !LightDM.Greeter.promptless) {
683+ if (stages.shown && !stages.overlayMode && !stages.locked) {
687+ launcher.switchToNextState("visible");
690+ if (greeter.shown) {
691+ greeter.hideRight();
628 id: overlay
697 id: overlay
@@ -631,17 +700,18 @@ FocusScope {
633 id: panel
702 id: panel
634 anchors.fill: parent //because this draws indicator menus
704 anchors.fill: parent //because this draws indicator menus
635 indicators {
705 indicators {
636 hides: [launcher]
706 hides: [launcher]
637− available: edgeDemo.panelEnabled
707+ available: edgeDemo.panelEnabled && greeter.fakeActiveForApp === ""
638 contentEnabled: edgeDemo.panelContentEnabled
708 contentEnabled: edgeDemo.panelContentEnabled
639 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
709 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
640 panelHeight: units.gu(3)
710 panelHeight: units.gu(3)
642 property string focusedAppId: ApplicationManager.focusedApplicationId
712 property string focusedAppId: ApplicationManager.focusedApplicationId
643 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
713 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
644− fullscreenMode: focusedApplication && stages.fullscreen && !greeter.shown && !lockscreen.shown
714+ fullscreenMode: (focusedApplication && stages.fullscreen && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
646 InputFilterArea {
716 InputFilterArea {
647 anchors {
717 anchors {
@@ -666,6 +736,7 @@ FocusScope {
667 Launcher {
737 Launcher {
668 id: launcher
738 id: launcher
739+ objectName: "launcher"
670 readonly property bool dashSwipe: progress > 0
741 readonly property bool dashSwipe: progress > 0
@@ -673,29 +744,15 @@ FocusScope {
673 anchors.bottom: parent.bottom
744 anchors.bottom: parent.bottom
674 width: parent.width
745 width: parent.width
675 dragAreaWidth: shell.edgeSize
746 dragAreaWidth: shell.edgeSize
676− available: edgeDemo.launcherEnabled
747+ available: edgeDemo.launcherEnabled && greeter.fakeActiveForApp === ""
678− onShowDashHome: {
749+ onShowDashHome: showHome()
679− if (edgeDemo.running)
684− onDash: {
750+ onDash: showDash()
685− if (stages.shown && !stages.overlayMode && !stages.locked) {
689− launcher.switchToNextState("visible");
692− if (greeter.shown) {
693− greeter.hideRight();
697 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
751 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
698 onLauncherApplicationSelected: {
752 onLauncherApplicationSelected: {
753+ if (greeter.fakeActiveForApp !== "") {
699 if (!edgeDemo.running)
756 if (!edgeDemo.running)
700 shell.activateApplication(appId)
757 shell.activateApplication(appId)