on xenial help sign in
Make background of shell window transparent
commitaa49fd3000bb0a7abbdc0fcbd12d0d6c61c0b4a8 authorMichael Terry <michael.terry@canonical.com> dateTue 29 Oct 2013, 14:57 (13 years ago) parent0a08455
1 file changed+7−1
main.cpp+7−1
main.cpp+7−1
@@ -168,7 +168,13 @@ int startShell(int argc, const char** argv, void* server)
168168 }
169169
170170 view->setSource(source);
171− view->setColor("transparent");
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);
177+ view->setColor(Qt::transparent);
172178
173179 if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
174180 // First, size window equal to screen (fake a real WM fullscreen mode).