summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-07-28 13:16:34 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2014-07-28 13:22:50 (GMT)
commitc7634050d9675006ceb4dd0c17846d18ec0f24c5 (patch)
treec94e823cdb6321c40f8396694e5ac59ea8ef8228 /src/gui/kernel
parentd2f494b2410be8c36e2e94da60a49124f560351f (diff)
downloadQt-c7634050d9675006ceb4dd0c17846d18ec0f24c5.zip
Qt-c7634050d9675006ceb4dd0c17846d18ec0f24c5.tar.gz
Qt-c7634050d9675006ceb4dd0c17846d18ec0f24c5.tar.bz2
qwidget_win.cpp: Initialize WINDOWPLACEMENT correctly.
Task-number: QTBUG-40466 Change-Id: I93ff7977d68d36bc89f98d6a43c103a2a8d730f7 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_win.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 04b6a14..5fe698e 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -1473,6 +1473,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
// If the window is hidden and in maximized state or minimized, instead of moving the
// window, set the normal position of the window.
WINDOWPLACEMENT wndpl;
+ wndpl.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(q->internalWinId(), &wndpl);
if ((wndpl.showCmd == SW_MAXIMIZE && !IsWindowVisible(q->internalWinId())) || wndpl.showCmd == SW_SHOWMINIMIZED) {
RECT normal = {fs.x(), fs.y(), fs.x()+fs.width(), fs.y()+fs.height()};