on xenial help sign in
Make background of shell window transparent
aa49fd3Michael Terry
main.cpp+7−1
@@ -168,7 +168,13 @@ int startShell(int argc, const char** argv, void* server)
168 }
168 }
169
169
170 view->setSource(source);
170 view->setSource(source);
171+
172+ // Make background transparent, so that the greeter can bleed through.
173+ // In normal shell, the background is never seen.
174+ QSurfaceFormat format;
175+ format.setAlphaBufferSize(8);
176+ view->setFormat(format);
171− view->setColor("transparent");
177+ view->setColor(Qt::transparent);
172
178
173 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
179 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
174 // First, size window equal to screen (fake a real WM fullscreen mode).
180 // First, size window equal to screen (fake a real WM fullscreen mode).