summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowswindow.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-07-28 13:24:55 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2017-08-02 21:07:36 +0000
commit0257ffe465d89a99f062c366bd7c7cd6d6826b4d (patch)
tree4d01b6e07157cb3020a7807c8dadcca7b34a7dc0 /src/plugins/platforms/windows/qwindowswindow.h
parent4bfff6a98b59b32605d881a463ad3edc221a7dc8 (diff)
Windows QPA: Store requested geometry before QPlatformWindow::initialGeometry()
When requesting windows with a size of 0x0 for which a default size is determined by QPlatformWindow::initialGeometry(), QWindowsWindow::initialize() did not call handleGeometry() since it compared against the requested geometry obtained after calling QPlatformWindow::initialGeometry(). Store the initial geometry in the context. Amends deb7f9a7c3b2044ef6d6253a3f836fe1837bde6e. Task-number: QTBUG-62177 Task-number: QTBUG-61977 Change-Id: I9e96f2f0b984b9009bebb192f576c92b4409d5d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.h')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 60289bdc08..3308dfb239 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -81,9 +81,10 @@ struct QWindowsGeometryHint
struct QWindowCreationContext
{
- QWindowCreationContext(const QWindow *w, const QRect &r,
- const QMargins &customMargins,
- DWORD style, DWORD exStyle);
+ explicit QWindowCreationContext(const QWindow *w,
+ const QRect &geometryIn, const QRect &geometry,
+ const QMargins &customMargins,
+ DWORD style, DWORD exStyle);
void applyToMinMaxInfo(MINMAXINFO *mmi) const
{ geometryHint.applyToMinMaxInfo(style, exStyle, mmi); }
@@ -91,7 +92,8 @@ struct QWindowCreationContext
const QWindow *window;
DWORD style;
DWORD exStyle;
- QRect requestedGeometry;
+ QRect requestedGeometryIn; // QWindow scaled
+ QRect requestedGeometry; // after QPlatformWindow::initialGeometry()
QRect obtainedGeometry;
QMargins margins;
QMargins customMargins; // User-defined, additional frame for WM_NCCALCSIZE