qt6-bb10/tests/auto/gui
Tor Arne Vestbø c97e58bb61 Reset QWindow positionPolicy on destroy
If a window is positioned with setFramePosition, we reflect that to
the platform window via QPlatformWindow::setGeometry(), but with the
QWindowPrivate::positionPolicy set to WindowFrameInclusive. On the
platform side the position policy is read from QWindowPrivate to
determine how to interpret the incoming geometry.

When the resulting geometry is applied to the native window,
it's reflected through QPlatformWindow::geometry() and reported
back via QWSI::handleGeometryChange() as client geometry, ie.
without the frame margins.

If the platform layer later interprets this geometry in
combination with the window's positionPolicy, it will incorrectly
position the frame top left at the point of the client geometry's
top left.

It would make sense to reset the window's positionPolicy at
the point of QGuiApplicationPrivate::processGeometryChangeEvent,
but doing so might break situations where there's another in
flight geometry request.

What we can do as a first step is reset the positionPolicy when
the platform window is destroyed. This ensures that the next
time the platform window is created it will be placed at the
same position, even if the initial position was requested via
the setFramePosition() API.

Change-Id: Ic555f19884ccd68c46421d0fe666717170ba7638
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 11a09a9bd0a7e899a918b078a94c6c3b82240dee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-28 17:40:05 +00:00
..
image Remove inline downscaling in png reader 2024-08-16 06:49:53 +00:00
itemmodels Fix QFileSystemModel::fileName when the index column is > 0 2024-06-27 01:31:41 +00:00
kernel Reset QWindow positionPolicy on destroy 2024-08-28 17:40:05 +00:00
math3d tst_qmatrixnxn: Mark variable as unused to avoid compiler warning 2024-05-29 20:27:18 +02:00
painting Work around compiler bug in QTransform 2024-08-25 17:03:57 +00:00
platform tests: skip most functions in tst_qx11info on offscreen 2024-06-14 11:02:50 +00:00
qopengl Change license for tests files 2024-02-04 09:56:42 +01:00
qopenglconfig Change license for tests files 2024-02-04 09:56:42 +01:00
qvulkan Revert "Android: SKIP cases failing on Android 12 CI with 16GB RAM" 2024-04-05 20:31:07 +00:00
rhi Revert "Skip Vulkan on Android in QRhi autotest" 2024-04-05 20:31:07 +00:00
text Respect QTextDocument::defaultFont() in ODF writer 2024-08-19 19:42:55 +00:00
util QDesktopServices: clean up pre-Qt-6.6 code 2024-05-15 18:22:39 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00