From 6fbc0bcce1e4f082ddedc8a48cadf3e4214e94fa Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 1 Dec 2014 15:25:59 +0100 Subject: Restrict the qtlauncher window size on Wayland The window management capabilities of Weston are limited, to put it mildly, so creating large windows should be avoided. Restrict the size to 800x600. Change-Id: I1fbbe1c68a4ab56cfcbbb688265f6c43ac3d8473 Reviewed-by: Andy Nichols --- qml/Main.qml | 4 ++-- src/main.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qml/Main.qml b/qml/Main.qml index 0b7557b..a5fece0 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -25,8 +25,8 @@ Window { id: window visible: true - width: Screen.desktopAvailableWidth - height: Screen.desktopAvailableHeight + width: qpa_platform == "wayland" ? 800 : Screen.desktopAvailableWidth + height: qpa_platform == "wayland" ? 600 : Screen.desktopAvailableHeight color: "black" property color qtpurple: '#ae32a0' diff --git a/src/main.cpp b/src/main.cpp index b07ee8f..22bcb1c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,6 +98,7 @@ int main(int argc, char **argv) QQmlApplicationEngine engine; engine.rootContext()->setContextProperty("applicationSettings", &applicationSettings); + engine.rootContext()->setContextProperty("qpa_platform", qGuiApp->platformName()); engine.load(applicationSettings.mainFile()); app.exec(); -- cgit v1.2.3