summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-09 10:46:20 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-09 16:52:37 +0100
commit9ccd359be8a3fa1a050f839f99ce5f00aa2c9ea6 (patch)
tree7e7258c27fdd0b3ba7bd67e738ca7668283f2d39 /tests
parent66e48d2c2fad494504cad0b699300c750fa28383 (diff)
Attempt to make the positioning test of QWindow more reliable
The part of the test that verifies that setFramePosition moves the window successfully appears to be very unreliable in the CI system. The "tested" frame position is calculated to be at (40, 40) relative to the top left of the available screen geometry, which can be non-zero due to task bars and similar system ui elements. However that position appears to be unreliable in the sense that the window manager doesn't seem to always respect that. So instead let's try placing the window (by frame position) in the center of the screen instead. Change-Id: I96fe6c37e748fc18262632b5effe5a9e90dc0028 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 46b33e5d39..2b28f0a1d4 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -301,7 +301,7 @@ void tst_QWindow::positioning()
// if our positioning is actually fully respected by the window manager
// test whether it correctly handles frame positioning as well
if (originalPos == geometry.topLeft() && (originalMargins.top() != 0 || originalMargins.left() != 0)) {
- QPoint framePos = QPlatformScreen::platformScreenForWindow(&window)->availableGeometry().topLeft() + QPoint(40, 40);
+ QPoint framePos = QPlatformScreen::platformScreenForWindow(&window)->availableGeometry().center();
window.reset();
window.setFramePosition(framePos);