path: root/tests/auto/widgets/kernel/qwidget/BLACKLIST
diff options
authorGatis Paeglis <>2018-06-25 10:32:07 +0200
committerGatis Paeglis <>2018-06-26 07:11:34 +0000
commit4050ee6ac7da0e5e7414c699c3cd4e26193c653d (patch)
tree68d6110d1fadc30c2e2d3227ff99254f7881d623 /tests/auto/widgets/kernel/qwidget/BLACKLIST
parent0e2dae902b316a40a1d861198da55118d2155964 (diff)
xcb: rely on WM_SIZE_HINTS gravity to handle x,y positioning
The original code was added by b316c3ac5e4acac75505bfd77677cecc181599a (in 2012). This patch changes two things: 1) We now rely on WM to position a window based on the set gravity. It should not be necessary to calculate coordinates manually as was done in windowToWmGeometry(). We don't even know the decoration size before the window is mapped. 2) We now update gravity whenever needed instead of hardcoding based on what Qt APIs (setGeometry vs setFramePosition) where used to set the initial window position. The patch from b316c3a says: "Determine gravity from initial position. Do not change later as it will cause the window to move uncontrollably" Since it did not elaborate on the situation, we can only assume that it was caused by another bug in Qt at the time or perhaps a broken WM. From [1]: "Applications are free to change their win_gravity setting at any time. If an Application changes its win_gravity then the Window Manager should adjust the reference point, so that the client window will not move as the result." Tested on Ubuntu/Unity, KDE/KWin, Gnome-shell/Mutter, Lubuntu/OpenBox. Works as expected everywhere expect Unity. Unity seems to ignore XCB_GRAVITY_STATIC and treats it as XCB_GRAVITY_NORTH_WEST, which means that setGeometry/setFramePosition produce the same placement on this WM (the behavior was the same also before this patch). P.S. Also renamed xRect -> rect, which was a leftover from ae5f2a66720a4bb22c120bd7d1564652cac00367 With this change we can un-blacklist QWidget save/restore geometry auto tests. [1] Task-number: QTBUG-66708 Change-Id: I381eef5d34dddb04de16a897ce5540b9c430b216 Reviewed-by: Tor Arne Vestbø <> Reviewed-by: Gatis Paeglis <>
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/BLACKLIST')
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 86c196f773..d135b15c6e 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -3,10 +3,7 @@
-# QTBUG-66708