From 392d8b5a75b4ac70b3dc4e856793771d86c50d82 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 26 Jan 2015 15:20:07 +0100 Subject: 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 --- src/plugins/platforms/windows/qwindowswindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(), margins.top())); } - 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), -- cgit v1.2.3