summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2013-12-06 15:12:50 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-09 15:40:18 +0100
commitfbc6240cc6f4846fbde1ee8dff6cda28863ed55f (patch)
treedda181de35b342e6227c4e725e47e488a50f0c16 /src/plugins
parent29b0a565e9e420a6dc34aaaf3b66976bb75edcb0 (diff)
Windows: Fix corner case where frameless windows would cover the taskbar.
In commit 0c936ca83c40b73f30195a619900f2be98b9e968 we fixed the case where the window was maximized programmatically, but if the window gets restored by clicking on the taskbar we don't get to set WithinMaximize flag, since we immediately get the WM_GETMINMAXINFO request from Windows. To reproduce the problem, run tests/manual/windowflags, remove frames, maximize, minimize, and restore by clicking on the taskbar. Task-number: QTBUG-8361 Change-Id: I8a7cf4fccbb2c3dac5f570848501ac1e8d2c2307 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 89b5bdbf0e..51902385e1 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1912,7 +1912,8 @@ void QWindowsWindow::getSizeHints(MINMAXINFO *mmi) const
const QWindowsGeometryHint hint(window(), m_data.customMargins);
hint.applyToMinMaxInfo(m_data.hwnd, mmi);
- if (testFlag(WithinMaximize) && (m_data.flags & Qt::FramelessWindowHint)) {
+ if ((testFlag(WithinMaximize) || (window()->windowState() == Qt::WindowMinimized))
+ && (m_data.flags & Qt::FramelessWindowHint)) {
// This block fixes QTBUG-8361: Frameless windows shouldn't cover the
// taskbar when maximized
if (const QScreen *screen = effectiveScreen(window())) {