summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/tst_compositor.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-05-10 10:25:10 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-05-14 11:12:53 +0000
commit03e1c35ab6a4395db3c7b71dd0bdd9a1956f7272 (patch)
tree45e250b34abb497b0b7cbade3d3cc9786d77fee7 /tests/auto/compositor/compositor/tst_compositor.cpp
parentbb02115ff1c23289264b077d7d24b723fd9d339a (diff)
Fix tst_WaylandCompositor::sizeFollowsWindow on high-dpi
The QWindow we use may have devicePixelRatio != 1 and that caused the test to fail. Change-Id: I3d248ed85cea521a3d543026a87f92c085116461 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/compositor/compositor/tst_compositor.cpp')
-rw-r--r--tests/auto/compositor/compositor/tst_compositor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp
index 575ea646..ae5ea927 100644
--- a/tests/auto/compositor/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/compositor/tst_compositor.cpp
@@ -261,7 +261,9 @@ void tst_WaylandCompositor::sizeFollowsWindow()
compositor.create();
- QWaylandOutputMode mode(window.size(), qFloor(window.screen()->refreshRate() * 1000));
+ // window.size() is not in pixels
+ auto pixelSize = window.size() * window.devicePixelRatio();
+ QWaylandOutputMode mode(pixelSize, qFloor(window.screen()->refreshRate() * 1000));
MockClient client;