summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-15 12:12:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-21 16:41:24 +0000
commit42c6ea4f6c29845d68e865b19a73a09cc6d0bdbe (patch)
tree3f8846ce8bf548d8b086ff5802c8246a6875c6cf /src/plugins
parent2978caa2ed95447840d434f6c7bf1ad5e1b7eeb6 (diff)
QPlatformWindow: Extract static method for closestAcceptableGeometry().
On Windows, some messages occur before a QPlatformWindow is actually created, for example WM_WINDOWPOSCHANGING, which is handled in QWindowsWindow::handleGeometryChangingMessage(). Extract a static function QPlatformWindow::closestAcceptableGeometry() from QPlatformWindow::windowClosestAcceptableGeometry() and use that in QWindowsWindow::handleGeometryChangingMessage(). This fixes a regression crash occurring in Qt 5.6 when running the example from QTBUG-48201. Task-number: QTBUG-36220 Task-number: QTBUG-48201 Task-number: QTBUG-46615 Change-Id: I86b8f923447c8e447382427cf5795628ef1c9717 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index f9b34334df..531836015c 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1825,7 +1825,7 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow *
const QRect suggestedFrameGeometry(windowPos->x, windowPos->y,
windowPos->cx, windowPos->cy);
const QRect suggestedGeometry = suggestedFrameGeometry - margins;
- const QRectF correctedGeometryF = qWindow->handle()->windowClosestAcceptableGeometry(suggestedGeometry);
+ const QRectF correctedGeometryF = QPlatformWindow::closestAcceptableGeometry(qWindow, suggestedGeometry);
if (!correctedGeometryF.isValid())
return false;
const QRect correctedFrameGeometry = correctedGeometryF.toRect() + margins;