Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
5edb71c6d (dev), fe4955c2f (6.5)
Description
Perhaps it makes sense to dumb down the restoreGeometry() logic. This function is full of undocumented tweaks. It should simply take the saved geometry, screen, and/or window placement in a virtual desktop and call the corresponding APIs to set the stored values, without any sanity checking. That is all. If a user has changed a desktop settings (e.g. screen size, window decoration size) then an application should have an option to not restore from saved settings (or reset to defaults), the API should not try do undocumented magic. A smarter restoreGeometry() version could even store screen serial numbers and return 'false' if things has changed. There are a lot of arbitrary ways to do this, perhaps the best is to have a dumb version and document it as such and inform developers that they can write a smarter/custom version if desired.
Attachments
Issue Links
- relates to
-
QTBUG-69410 Qt Widgets Changes in Qt 6
- Closed
-
QTBUG-68446 restoreGeometry() fails on multiscreen setup when application is maximized on Linux.
- Reported
-
QTBUG-77385 QWidget::restoreGeometry does not work as documented.
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-69104 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
448295,14 | Fix QWidget::restoreGeometry when restored geometry is off screen | dev | qt/qtbase | Status: MERGED | +2 | 0 |
449468,2 | Fix QWidget::restoreGeometry when restored geometry is off screen | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
449469,2 | Fix QWidget::restoreGeometry when restored geometry is off screen | 6.4 | qt/qtbase | Status: ABANDONED | 0 | 0 |