From 21d652e993126934c71b585291a7c87603e81428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 7 Jan 2015 13:20:04 +0100 Subject: [PATCH] [tests] Create Output before XWayland is started This is required to get a proper size in the XWayland server. Without an output the size is 0,0. --- src/wayland/tests/waylandservertest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wayland/tests/waylandservertest.cpp b/src/wayland/tests/waylandservertest.cpp index 9d8c79c1df..bac120cb69 100644 --- a/src/wayland/tests/waylandservertest.cpp +++ b/src/wayland/tests/waylandservertest.cpp @@ -87,6 +87,11 @@ int main(int argc, char **argv) compositor->create(); ShellInterface *shell = display.createShell(); shell->create(); + OutputInterface *output = display.createOutput(&display); + output->setPhysicalSize(QSize(10, 10)); + output->addMode(QSize(1024, 768)); + output->create(); + display.createShm(); // starts XWayland by forking and opening a pipe const int pipe = startXServer(); @@ -95,7 +100,7 @@ int main(int argc, char **argv) } // need four roundtrips to dispatch events - for (int i = 0; i < 4; i++) { + for (int i = 0; i < 5; i++) { display.dispatchEvents(1000); } @@ -105,11 +110,6 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); display.startLoop(); - display.createShm(); - OutputInterface *output = display.createOutput(&display); - output->setPhysicalSize(QSize(10, 10)); - output->addMode(QSize(1024, 768)); - output->create(); SeatInterface *seat = display.createSeat(); seat->setName(QStringLiteral("testSeat0")); seat->create();