[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.
This commit is contained in:
parent
8d5e14ebfe
commit
21d652e993
1 changed files with 6 additions and 6 deletions
|
@ -87,6 +87,11 @@ int main(int argc, char **argv)
|
||||||
compositor->create();
|
compositor->create();
|
||||||
ShellInterface *shell = display.createShell();
|
ShellInterface *shell = display.createShell();
|
||||||
shell->create();
|
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
|
// starts XWayland by forking and opening a pipe
|
||||||
const int pipe = startXServer();
|
const int pipe = startXServer();
|
||||||
|
@ -95,7 +100,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// need four roundtrips to dispatch events
|
// need four roundtrips to dispatch events
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
display.dispatchEvents(1000);
|
display.dispatchEvents(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,11 +110,6 @@ int main(int argc, char **argv)
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
display.startLoop();
|
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();
|
SeatInterface *seat = display.createSeat();
|
||||||
seat->setName(QStringLiteral("testSeat0"));
|
seat->setName(QStringLiteral("testSeat0"));
|
||||||
seat->create();
|
seat->create();
|
||||||
|
|
Loading…
Reference in a new issue