diff options
author | Simon Rettberg | 2017-11-12 13:04:26 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-11-12 13:04:26 +0100 |
commit | 542b440ad64b50f265b72246981d5e9d655eb4d4 (patch) | |
tree | eecc5cca04dc8643662cdb1415ceeb03cc97a9c9 /src/main.cpp | |
parent | WORK IN PROGRESS! Add bwlp logo, banner support, log message window (diff) | |
download | slxgreeter-542b440ad64b50f265b72246981d5e9d655eb4d4.tar.gz slxgreeter-542b440ad64b50f265b72246981d5e9d655eb4d4.tar.xz slxgreeter-542b440ad64b50f265b72246981d5e9d655eb4d4.zip |
Fix banner display, gradient parsing, add test mode (--test)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index b1c7962..769c570 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,6 @@ #include <QPainter> #include <QMap> -#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <fcntl.h> /* Obtain O_* constant definitions */ #include <unistd.h> @@ -36,7 +35,7 @@ static inline int size(const QRect& r) int main(int argc, char *argv[]) { - dup2(2, 1); + //dup2(2, 1) // I have no idea why, but Qt's stock qDebug() output never makes it // to /var/log/lightdm/x-0-greeter.log, so we use std::cerr instead.. qInstallMessageHandler(messageHandler); @@ -52,7 +51,7 @@ int main(int argc, char *argv[]) // black QImage entire; QSize desktopSize = QApplication::desktop()->size(); - qDebug() << "Desktop full size is " << desktopSize; + qWarning() << "Desktop full size is " << desktopSize; entire = QImage(desktopSize, QImage::Format_RGB32); QPainter painter(&entire); @@ -89,11 +88,12 @@ int main(int argc, char *argv[]) } // Now set up all the screens + bool testMode = argc > 1 && QString(argv[1]) == QString("--test"); MainWindow *focusWindow = 0; QMapIterator<int, QRect> it(screens); while (it.hasNext()) { it.next(); - MainWindow *w = new MainWindow(primary == it.key(), it.key(), it.value()); + MainWindow *w = new MainWindow(primary == it.key(), it.key(), it.value(), testMode); w->show(); if (w->showLoginForm()) { focusWindow = w; |