aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Revest <revestflo@gmail.com>2017-02-27 23:27:38 +0100
committerFlorent Revest <revestflo@gmail.com>2017-02-27 23:29:56 +0100
commitf6deeed2f9d4521ee4f5f812484f3a52c96b5d9e (patch)
tree27dd680c18d747e7e71e1de76238cb5299d8f64d
parentf4f96da06355b210f74a8b6dee8417ddbbe86926 (diff)
main: Resizes main window before showing it in order to avoid glitches from asteroid-launcher with newer QtWaylandCompositor versions
-rw-r--r--main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 9ec8283..f710ec4 100644
--- a/main.cpp
+++ b/main.cpp
@@ -17,6 +17,7 @@
#include <QQuickView>
#include <QGuiApplication>
+#include <QScreen>
#include <MDeclarativeCache>
Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -25,6 +26,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
QScopedPointer<QQuickView> view(MDeclarativeCache::qQuickView());
view->setSource(QUrl("qrc:/main.qml"));
view->setTitle("Stopwatch");
- view->showFullScreen();
+ view->resize(app->primaryScreen()->size());
+ view->show();
return app->exec();
}