@@ -129,7 +129,7 @@ FocusScope {
130 objectName: "dash"
130 objectName: "dash"
132− available: !greeter.shown && !lockscreen.shown
132+ available: !LightDM.Greeter.active
133 hides: [stages, launcher, panel.indicators]
133 hides: [stages, launcher, panel.indicators]
134 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
134 shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
135 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
135 enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
@@ -194,7 +194,7 @@ FocusScope {
196 if (shown) {
196 if (shown) {
197− if (overlayMode || locked) {
197+ if (overlayMode || locked || greeter.fakeActiveForApp !== "") {
198 return 0;
198 return 0;
200 return launcher.progress
200 return launcher.progress
@@ -239,10 +239,17 @@ FocusScope {
239 target: ApplicationManager
239 target: ApplicationManager
241 onFocusRequested: {
241 onFocusRequested: {
242+ if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== appId) {
242 stages.show(true);
246 stages.show(true);
245 onFocusedApplicationIdChanged: {
249 onFocusedApplicationIdChanged: {
250+ if (greeter.fakeActiveForApp !== "" && greeter.fakeActiveForApp !== ApplicationManager.focusedApplicationId) {
246 if (ApplicationManager.focusedApplicationId.length > 0) {
253 if (ApplicationManager.focusedApplicationId.length > 0) {
247 stages.show(false);
254 stages.show(false);
@@ -433,6 +440,11 @@ FocusScope {
434 source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
441 source: shell.sideStageEnabled ? "Stages/StageWithSideStage.qml" : "Stages/PhoneStage.qml"
444+ target: applicationsDisplayLoader.item
445+ property: "objectName"
436 Binding {
448 Binding {
437 target: applicationsDisplayLoader.item
449 target: applicationsDisplayLoader.item
438 property: "moving"
450 property: "moving"
@@ -448,6 +460,11 @@ FocusScope {
448 property: "dragAreaWidth"
460 property: "dragAreaWidth"
449 value: shell.edgeSize
461 value: shell.edgeSize
464+ target: applicationsDisplayLoader.item
465+ property: "spreadEnabled"
466+ value: greeter.fakeActiveForApp === "" // to support emergency dialer hack
@@ -472,6 +489,13 @@ FocusScope {
473 onEntered: LightDM.Greeter.respond(passphrase);
490 onEntered: LightDM.Greeter.respond(passphrase);
474 onCancel: greeter.show()
491 onCancel: greeter.show()
493+ greeter.fakeActiveForApp = "dialer-app"
494+ shell.activateApplication("dialer-app")
498+ onShownChanged: if (shown) greeter.fakeActiveForApp = ""
476 Component.onCompleted: {
500 Component.onCompleted: {
477 if (LightDM.Users.count == 1) {
501 if (LightDM.Users.count == 1) {
@@ -504,6 +528,7 @@ FocusScope {
505 if (LightDM.Greeter.authenticated) {
529 if (LightDM.Greeter.authenticated) {
506 lockscreen.hide();
530 lockscreen.hide();
508 lockscreen.clear(true);
533 lockscreen.clear(true);
@@ -513,7 +538,7 @@ FocusScope {
513 Binding {
538 Binding {
514 target: LightDM.Greeter
539 target: LightDM.Greeter
515 property: "active"
540 property: "active"
516− value: greeter.shown || lockscreen.shown
541+ value: greeter.shown || lockscreen.shown || greeter.fakeActiveForApp != ""
519 Rectangle {
544 Rectangle {
@@ -536,11 +561,16 @@ FocusScope {
538 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
563 readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
564+ onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress === 0) greeter.login()
540 Greeter {
566 Greeter {
541 id: greeter
567 id: greeter
542 objectName: "greeter"
568 objectName: "greeter"
570+ signal sessionStarted() // helpful for tests
572+ property string fakeActiveForApp: ""
544 available: true
574 available: true
545 hides: [launcher, panel.indicators]
575 hides: [launcher, panel.indicators]
546 shown: true
576 shown: true
@@ -552,6 +582,16 @@ FocusScope {
553 dragHandleWidth: shell.edgeSize
583 dragHandleWidth: shell.edgeSize
587+ LightDM.Greeter.startSessionSync();
555 onShownChanged: {
595 onShownChanged: {
556 if (shown) {
596 if (shown) {
557 lockscreen.reset();
597 lockscreen.reset();
@@ -563,6 +603,7 @@ FocusScope {
563 if (LightDM.Users.count == 1) {
603 if (LightDM.Users.count == 1) {
564 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
604 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
606+ greeter.fakeActiveForApp = "";
566 greeter.forceActiveFocus();
607 greeter.forceActiveFocus();
@@ -612,12 +653,40 @@ FocusScope {
614 function showHome() {
655 function showHome() {
656+ if (edgeDemo.running) {
660+ if (LightDM.Greeter.active) {
661+ if (!LightDM.Greeter.promptless) {
615− var animate = !greeter.shown && !stages.shown
667+ var animate = !LightDM.Greeter.active && !stages.shown
617 dash.setCurrentScope("clickscope", animate, false)
668 dash.setCurrentScope("clickscope", animate, false)
618 stages.hide()
669 stages.hide()
672+ function showDash() {
673+ if (LightDM.Greeter.active && !LightDM.Greeter.promptless) {
677+ if (stages.shown && !stages.overlayMode && !stages.locked) {
681+ launcher.switchToNextState("visible");
684+ if (greeter.shown) {
685+ greeter.hideRight();
622 id: overlay
691 id: overlay
@@ -625,17 +694,18 @@ FocusScope {
627 id: panel
696 id: panel
628 anchors.fill: parent //because this draws indicator menus
698 anchors.fill: parent //because this draws indicator menus
629 indicators {
699 indicators {
630 hides: [launcher]
700 hides: [launcher]
631− available: edgeDemo.panelEnabled
701+ available: edgeDemo.panelEnabled && greeter.fakeActiveForApp === ""
632 contentEnabled: edgeDemo.panelContentEnabled
702 contentEnabled: edgeDemo.panelContentEnabled
633 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
703 width: parent.width > units.gu(60) ? units.gu(40) : parent.width
634 panelHeight: units.gu(3)
704 panelHeight: units.gu(3)
636 property string focusedAppId: ApplicationManager.focusedApplicationId
706 property string focusedAppId: ApplicationManager.focusedApplicationId
637 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
707 property var focusedApplication: ApplicationManager.findApplication(focusedAppId)
638− fullscreenMode: focusedApplication && stages.fullscreen && !greeter.shown && !lockscreen.shown
708+ fullscreenMode: (focusedApplication && stages.fullscreen && !LightDM.Greeter.active) || greeter.fakeActiveForApp !== ""
640 InputFilterArea {
710 InputFilterArea {
641 anchors {
711 anchors {
@@ -660,6 +730,7 @@ FocusScope {
661 Launcher {
731 Launcher {
662 id: launcher
732 id: launcher
733+ objectName: "launcher"
664 readonly property bool dashSwipe: progress > 0
735 readonly property bool dashSwipe: progress > 0
@@ -667,29 +738,15 @@ FocusScope {
667 anchors.bottom: parent.bottom
738 anchors.bottom: parent.bottom
668 width: parent.width
739 width: parent.width
669 dragAreaWidth: shell.edgeSize
740 dragAreaWidth: shell.edgeSize
670− available: edgeDemo.launcherEnabled
741+ available: edgeDemo.launcherEnabled && greeter.fakeActiveForApp === ""
672− onShowDashHome: {
743+ onShowDashHome: showHome()
673− if (edgeDemo.running)
678− onDash: {
744+ onDash: showDash()
679− if (stages.shown && !stages.overlayMode && !stages.locked) {
683− launcher.switchToNextState("visible");
686− if (greeter.shown) {
687− greeter.hideRight();
691 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
745 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
692 onLauncherApplicationSelected: {
746 onLauncherApplicationSelected: {
747+ if (greeter.fakeActiveForApp !== "") {
693 if (!edgeDemo.running)
750 if (!edgeDemo.running)
694 shell.activateApplication(appId)
751 shell.activateApplication(appId)