diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-01 11:15:32 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-11-08 16:48:04 +0100 |
commit | 8f2db974ab594125301aac62594510e146125cb4 (patch) | |
tree | 5badb68dfc129116e4b8a88a53303cf3128c5a4a /src/gui/kernel/qplatformwindow.h | |
parent | 1dd83dd202eccf0d68b6dd0b2c2155a7cc3018d2 (diff) |
Windows QPA: Fix wrong scaling of fixed size in window creation phase
When a fixed size the window is moved to another screen
by QPlatformWindow::initialGeometry(), the size constraints
would be incorrectly scaled using the initial screen in the handling of
WM_GETMINMAXINFO.
To fix this, pass the resulting screen out of QPlatformWindow::initialGeometry()
and use it during the window creation phase.
Fixes: QTBUG-77307
Change-Id: I149a2a65e816da841a32abc14a495925bf9cc6f6
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformwindow.h')
-rw-r--r-- | src/gui/kernel/qplatformwindow.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index 4d48cc2f13..b6aeb3a86a 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -63,6 +63,7 @@ QT_BEGIN_NAMESPACE class QPlatformScreen; class QPlatformWindowPrivate; +class QScreen; class QWindow; class QIcon; class QRegion; @@ -142,8 +143,9 @@ public: virtual void invalidateSurface(); - static QRect initialGeometry(const QWindow *w, - const QRect &initialGeometry, int defaultWidth, int defaultHeight); + static QRect initialGeometry(const QWindow *w, const QRect &initialGeometry, + int defaultWidth, int defaultHeight, + const QScreen **resultingScreenReturn = nullptr); virtual void requestUpdate(); bool hasPendingUpdateRequest() const; |