4050ee6ac7
The original code was added byb316c3ac5e
(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 fromb316c3a
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 fromae5f2a6672
With this change we can un-blacklist QWidget save/restore geometry auto tests. [1] https://specifications.freedesktop.org/wm-spec/latest/ar01s09.html Task-number: QTBUG-66708 Change-Id: I381eef5d34dddb04de16a897ce5540b9c430b216 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
45 lines
616 B
Plaintext
45 lines
616 B
Plaintext
# OSX QTBUG-25300 QTBUG-45502
|
|
[normalGeometry]
|
|
ubuntu-16.04
|
|
[saveRestoreGeometry]
|
|
b2qt
|
|
[restoreVersion1Geometry]
|
|
osx
|
|
[updateWhileMinimized]
|
|
ubuntu-16.04
|
|
ubuntu-18.04
|
|
rhel-7.4
|
|
osx
|
|
[focusProxyAndInputMethods]
|
|
linux
|
|
[raise]
|
|
# QTBUG-68175
|
|
opensuse
|
|
[setWindowGeometry]
|
|
osx
|
|
[windowMoveResize]
|
|
osx
|
|
[childEvents]
|
|
osx ci
|
|
[renderInvisible]
|
|
osx
|
|
[optimizedResizeMove]
|
|
osx
|
|
[optimizedResize_topLevel]
|
|
osx
|
|
[render_systemClip]
|
|
osx
|
|
[showMinimizedKeepsFocus]
|
|
osx-10.11 ci
|
|
osx-10.12 ci
|
|
[maskedUpdate]
|
|
opensuse-42.3
|
|
[moveInResizeEvent]
|
|
ubuntu-16.04
|
|
[moveChild:right]
|
|
osx
|
|
[activateWindow]
|
|
osx-10.12 ci
|
|
[multipleToplevelFocusCheck]
|
|
linux
|