summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-05-22 17:11:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-23 12:49:39 +0200
commit5d5a476e596b9290eea693ae09ded0aee544b2b2 (patch)
tree87563146b025503ac88aa044e39d675d71a761b4
parent15fbc0112d260f680cb940c3bae531cb44a3895c (diff)
Windows: Pass auto-fixed window flags to shouldShowMaximizeButton().
Task-number: QTBUG-28407 Task-number: QTBUG-31258 Change-Id: Ie918fddbeb6adee4ccbfffb2fab62b3d1842d272 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index a5776e7c4e..403d709dba 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -203,10 +203,9 @@ static inline QSize clientSize(HWND hwnd)
return qSizeOfRect(rect);
}
-// from qwidget_win.cpp
-static bool shouldShowMaximizeButton(const QWindow *w)
+// from qwidget_win.cpp, pass flags separately in case they have been "autofixed".
+static bool shouldShowMaximizeButton(const QWindow *w, Qt::WindowFlags flags)
{
- const Qt::WindowFlags flags = w->flags();
if ((flags & Qt::MSWindowsFixedSizeDialogHint) || !(flags & Qt::WindowMaximizeButtonHint))
return false;
// if the user explicitly asked for the maximize button, we try to add
@@ -433,7 +432,7 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
style |= WS_SYSMENU;
if (flags & Qt::WindowMinimizeButtonHint)
style |= WS_MINIMIZEBOX;
- if (shouldShowMaximizeButton(w))
+ if (shouldShowMaximizeButton(w, flags))
style |= WS_MAXIMIZEBOX;
if (tool)
exStyle |= WS_EX_TOOLWINDOW;