build: add option to not build layershell

This commit is contained in:
outfoxxed 2024-02-04 17:25:27 -08:00
parent 767500b466
commit cab5ffc65e
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 21 additions and 4 deletions

View file

@ -1,4 +1,3 @@
#include <LayerShellQt/shell.h>
#include <qcommandlineoption.h>
#include <qcommandlineparser.h>
#include <qdir.h>
@ -11,6 +10,10 @@
#include "rootwrapper.hpp"
#ifdef CONF_LAYERSHELL
# include <LayerShellQt/shell.h>
#endif
int main(int argc, char** argv) {
const auto app = QGuiApplication(argc, argv);
QGuiApplication::setApplicationName("qtshell");
@ -40,7 +43,10 @@ int main(int argc, char** argv) {
return -1;
}
#if CONF_LAYERSHELL
LayerShellQt::Shell::useLayerShell();
#endif
// Base window transparency appears to be additive.
// Use a fully transparent window with a colored rect.
QQuickWindow::setDefaultAlphaBuffer(true);