qt5base-lts/tests/auto/widgets/kernel/qwidget
Axel Spoerl 5edb71c6d4 Fix QWidget::restoreGeometry when restored geometry is off screen
If a widget's geometry is restored to a screen, which is smaller than
the one it was saved from,
- the widget could appear (partly) off screen
- the widget's title bar and resize handles could be inaccessible

This patch refactors and documents checkRestoredGeometry.
In a first step, the restored geometry's size is checked against
a given screen size. It is corrected if necessary.
In a second step, the restored geometry is moved inside the screen,
if necessary.
It makes the function a static member of QWidgetPrivate in order to
expose it for auto testing and adds a respective test function to
tst_QWidget.

Fixes: QTBUG-77385
Fixes: QTBUG-4397
Task-number: QTBUG-69104
Pick-to: 6.5 6.4
Change-Id: I7172e27bfef86d82cd51de70b40de42e8895bae6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-16 22:58:11 +01:00
..
.gitignore
BLACKLIST Cleanup tst_QWidget BLACKLIST file 2022-12-02 19:53:01 +00:00
CMakeLists.txt Remove unused tst_qwidget_mac_helpers.h/mm 2022-11-10 13:31:01 +01:00
geometry-fullscreen.dat
geometry-maximized.dat
geometry.dat
hellotr_la.qm Send the LanguageChange event to all top level windows, not just widgets 2020-02-18 22:11:30 +01:00
tst_qwidget.cpp Fix QWidget::restoreGeometry when restored geometry is off screen 2022-12-16 22:58:11 +01:00