diff options
authorFriedemann Kleint <>2015-01-26 15:20:07 +0100
committerFriedemann Kleint <>2015-02-02 23:09:07 +0000
commit392d8b5a75b4ac70b3dc4e856793771d86c50d82 (patch)
parentec71482374969c3bebd59f3bd001cf2d922e6bcd (diff)
Windows: Fix screen changed emission for programmatic moves.
Assign geometry in setGeometryDp() only when minimized as otherwise the variable will be set by the handling of the resize event triggered by setGeometry_sys()handleGeometryChange(). As it is, it suppresses the emission of screen change signals for programmatic move operations since the move is not detected. Change-Id: I5cd32bb16fd41dd720c16ddf84b88df642677af7 Task-number: QTBUG-44070 Reviewed-by: Joerg Bornemann <>
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 65bc9742e4..c268954314 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1356,7 +1356,8 @@ void QWindowsWindow::setGeometryDp(const QRect &rectIn)
const QMargins margins = frameMarginsDp();
rect.moveTopLeft(rect.topLeft() + QPoint(margins.left(),;
- m_data.geometry = rect;
+ if (m_windowState == Qt::WindowMinimized)
+ m_data.geometry = rect; // Otherwise set by handleGeometryChange() triggered by event.
if (m_data.hwnd) {
// A ResizeEvent with resulting geometry will be sent. If we cannot
// achieve that size (for example, window title minimal constraint),