From 8f2db974ab594125301aac62594510e146125cb4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 1 Nov 2019 11:15:32 +0100 Subject: Windows QPA: Fix wrong scaling of fixed size in window creation phase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qplatformwindow.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/kernel/qplatformwindow.h') 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; -- cgit v1.2.3