diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2012-07-16 14:58:00 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-16 16:30:55 +0200 |
commit | cfe95aa746894d604b99e25ceaac689a9863c9ae (patch) | |
tree | f529c0145fdadf0f44116088a4974d8ceade5644 /src | |
parent | 7a2aafcbbf05866b531bb2c3da4aa739df9e190b (diff) |
Fix window size issue under Windows CE
Under Windows CE the top title window bar needs
to be taken into account when creating a window,
so the Style WS_OVERLAPPED needs to be passed to
AdjustWindowRectEx, to get the right size of the
window. For the desktop the documentation says,
that you should not pass the WS_OVERLAPPED flag,
but wince does not talk about this.
Change-Id: Id8c9d28b7aa04a9920e4cb81ac11463d9717a0e7
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 6ef85cd49a..184669d0a5 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -553,7 +553,9 @@ bool QWindowsGeometryHint::validSize(const QSize &s) const QMargins QWindowsGeometryHint::frame(DWORD style, DWORD exStyle) { RECT rect = {0,0,0,0}; +#ifndef Q_OS_WINCE style &= ~(WS_OVERLAPPED); // Not permitted, see docs. +#endif if (!AdjustWindowRectEx(&rect, style, FALSE, exStyle)) qErrnoWarning("%s: AdjustWindowRectEx failed", __FUNCTION__); const QMargins result(qAbs(rect.left), qAbs(rect.top), |