@@ -42,7 +42,7 @@ int startShell(int argc, const char** argv, void* server)
43 const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";
43 const bool isUbuntuMirServer = qgetenv("QT_QPA_PLATFORM") == "ubuntumirserver";
45− QGuiApplication::setApplicationName(UNITY8_SHELL ? "Unity 8" : "Unity 8 Greeter");
45+ QGuiApplication::setApplicationName(UNITY8_GREETER ? "Unity 8 Greeter" : "Unity 8");
46 QGuiApplication *application;
46 QGuiApplication *application;
47 if (isUbuntuMirServer) {
47 if (isUbuntuMirServer) {
48 QLibrary unityMir("unity-mir", 1);
48 QLibrary unityMir("unity-mir", 1);
@@ -62,7 +62,7 @@ int startShell(int argc, const char** argv, void* server)
63 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
63 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
64 if (indicatorProfile.isEmpty()) {
64 if (indicatorProfile.isEmpty()) {
65− indicatorProfile = "phone";
65+ indicatorProfile = UNITY8_GREETER ? "phone_greeter" : "phone";
68 resolveIconTheme();
68 resolveIconTheme();
@@ -89,9 +89,6 @@ int startShell(int argc, const char** argv, void* server)
90 bindtextdomain("unity8", translationDirectory().toUtf8().data());
90 bindtextdomain("unity8", translationDirectory().toUtf8().data());
92− // Tell indicator plugin what profile to use
93− qputenv("UNITY8_INDICATOR_PROFILE", INDICATOR_PROFILE);
95 QQuickView* view = new QQuickView();
92 QQuickView* view = new QQuickView();
96 view->setResizeMode(QQuickView::SizeRootObjectToView);
93 view->setResizeMode(QQuickView::SizeRootObjectToView);
97 view->setTitle("Qml Phone Shell");
94 view->setTitle("Qml Phone Shell");
@@ -119,7 +116,7 @@ int startShell(int argc, const char** argv, void* server)
119 nativeInterface->setProperty("ubuntuSessionType", 1);
116 nativeInterface->setProperty("ubuntuSessionType", 1);
120 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
117 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
122− QUrl source(::qmlDirectory() + (UNITY8_SHELL ? "Shell.qml" : "GreeterShell.qml"));
119+ QUrl source(::qmlDirectory() + (UNITY8_GREETER ? "GreeterShell.qml" : "Shell.qml"));
123 prependImportPaths(view->engine(), ::overrideImportPaths());
120 prependImportPaths(view->engine(), ::overrideImportPaths());
124 appendImportPaths(view->engine(), ::fallbackImportPaths());
121 appendImportPaths(view->engine(), ::fallbackImportPaths());
@@ -128,16 +125,16 @@ int startShell(int argc, const char** argv, void* server)
128 importPaths.replaceInStrings(QRegExp("qt5/imports$"), "qt5/imports/Unity-Mir");
125 importPaths.replaceInStrings(QRegExp("qt5/imports$"), "qt5/imports/Unity-Mir");
129 view->engine()->setImportPathList(importPaths);
126 view->engine()->setImportPathList(importPaths);
131−#if !UNITY8_SHELL
128+#if UNITY8_GREETER
132− // Make background transparent, so that the greeter can bleed through.
129+ // Add alpha to surface, so that the greeter can bleed through
133 QSurfaceFormat format;
130 QSurfaceFormat format;
134 format.setAlphaBufferSize(8);
131 format.setAlphaBufferSize(8);
135 view->setFormat(format);
132 view->setFormat(format);
136− view->setColor(Qt::transparent);
140 view->setSource(source);
136 view->setSource(source);
137+ view->setColor(Qt::transparent);
142 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
139 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
143 // First, size window equal to screen (fake a real WM fullscreen mode).
140 // First, size window equal to screen (fake a real WM fullscreen mode).