@@ -111,6 +111,8 @@ Item {
111111 // This is _only_ used to expose the property to autopilot tests
112112 readonly property string testShellMode: shellMode
113113
114+ readonly property alias greeter: greeterLoader.item
115+
114116 function activateApplication(appId) {
115117 if (ApplicationManager.findApplication(appId)) {
116118 ApplicationManager.requestFocusApplication(appId);
@@ -262,7 +264,9 @@ Item {
262264 ? "phone"
263265 : shell.usageScenario
264266 source: {
265− if (applicationsDisplayLoader.usageScenario === "phone") {
267+ if(shellMode === "greeter") {
268+ return "Stages/ShimStage.qml"
269+ } else if (applicationsDisplayLoader.usageScenario === "phone") {
266270 return "Stages/PhoneStage.qml";
267271 } else if (applicationsDisplayLoader.usageScenario === "tablet") {
268272 return "Stages/TabletStage.qml";
@@ -414,50 +418,59 @@ Item {
414418 }
415419 }
416420
417− Greeter {
418− id: greeter
419− objectName: "greeter"
420−
421− hides: [launcher, panel.indicators]
422− tabletMode: shell.usageScenario !== "phone"
423− launcherOffset: launcher.progress
424− forcedUnlock: tutorial.running
425− background: shell.background
426−
421+ Loader {
422+ id: greeterLoader
427423 anchors.fill: parent
428424 anchors.topMargin: panel.panelHeight
425+ sourceComponent: shellMode != "shell" ? integratedGreeter :
426+ Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
427+ onLoaded: {
428+ item.objectName = "greeter"
429+ }
430+ }
429431
430− // avoid overlapping with Launcher's edge drag area
431− // FIXME: Fix TouchRegistry & friends and remove this workaround
432− // Issue involves launcher's DDA getting disabled on a long
433− // left-edge drag
434− dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
432+ Component {
433+ id: integratedGreeter
434+ Greeter {
435435
436− onSessionStarted: {
437− launcher.hide();
438− }
436+ hides: [launcher, panel.indicators]
437+ tabletMode: shell.sideStageEnabled
438+ launcherOffset: launcher.progress
439+ forcedUnlock: tutorial.running
440+ background: shell.background
439441
440− onTease: {
441− if (!tutorial.running) {
442− launcher.tease();
442+ // avoid overlapping with Launcher's edge drag area
443+ // FIXME: Fix TouchRegistry & friends and remove this workaround
444+ // Issue involves launcher's DDA getting disabled on a long
445+ // left-edge drag
446+ dragHandleLeftMargin: launcher.available ? launcher.dragAreaWidth + 1 : 0
447+
448+ onSessionStarted: {
449+ launcher.hide();
450+ }
451+
452+ onTease: {
453+ if (!tutorial.running) {
454+ launcher.tease();
455+ }
443456 }
444− }
445457
446− onEmergencyCall: startLockedApp("dialer-app")
458+ onEmergencyCall: startLockedApp("dialer-app")
447459
448− Timer {
449− // See powerConnection for why this is useful
450− id: showGreeterDelayed
451− interval: 1
452− onTriggered: {
453− greeter.forceShow();
460+ Binding {
461+ target: ApplicationManager
462+ property: "suspended"
463+ value: greeter.shown
454464 }
455465 }
466+ }
456467
457− Binding {
458− target: ApplicationManager
459− property: "suspended"
460− value: greeter.shown
468+ Timer {
469+ // See powerConnection for why this is useful
470+ id: showGreeterDelayed
471+ interval: 1
472+ onTriggered: {
473+ greeter.forceShow();
461474 }
462475 }
463476