summaryrefslogtreecommitdiff
path: root/tests/auto/client/output
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-01-16 10:36:52 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-04-29 08:18:32 +0000
commit475910a75a5cd3332fe2f0e5740c4c3c2c0b8987 (patch)
tree3394058a22f4203b2a5624e174fdd412e947acdd /tests/auto/client/output
parent9ff83e63ddb23de7deb7a866269733739151ae2f (diff)
downloadqtwayland-475910a75a5cd3332fe2f0e5740c4c3c2c0b8987.tar.gz
Client: Fix reverse screen order
[ChangeLog][QPA plugin] Fixed a bug where QGuiApplication::screens() and primaryScreen() would return initial screens in the reverse order they were added by the compositor. QGuiApplication::primaryScreen() will now return the first output added by the compositor. Calling forceRoundTrip in registry_global() meant it would call itself recursively if there were additional wl_output events in the queue. This in turn meant the screens got added in the reverse order. Instead we now add the screen to a list of not yet initialized screens and add it properly when we've received the required done events (wl_output and possibly zdg_output_v1). This also has the added benefit of wl_output hot plugging not calling forceRoundTrip(). Fixes: QTBUG-72828 Change-Id: I35c6959d6c219f65fd19d571a25b5a6cdb3f741b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'tests/auto/client/output')
-rw-r--r--tests/auto/client/output/tst_output.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/auto/client/output/tst_output.cpp b/tests/auto/client/output/tst_output.cpp
index 45167948..2d2c8efd 100644
--- a/tests/auto/client/output/tst_output.cpp
+++ b/tests/auto/client/output/tst_output.cpp
@@ -215,10 +215,7 @@ void tst_output::screenOrder()
QTRY_COMPARE(QGuiApplication::screens().size(), 3);
const auto screens = QGuiApplication::screens();
- QEXPECT_FAIL(nullptr, "TODO: fix screen order", Continue);
QCOMPARE(screens[1]->model(), "Screen 1");
-
- QEXPECT_FAIL(nullptr, "TODO: fix screen order", Continue);
QCOMPARE(screens[2]->model(), "Screen 2");
exec([=] {