path: root/src
diff options
authorFriedemann Kleint <>2017-01-30 10:05:58 +0100
committerFriedemann Kleint <>2017-02-17 08:22:16 +0000
commita81dfb32d6f9e7a407567511c20b59e537f6a063 (patch)
treea46799f130ec6b706ec6dd49c9ebbb415b0ccd45 /src
parentd19bd1feb6c142e8113bc393653df6265dedfdab (diff)
Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for full update onlyv5.9.0-alpha1
It was introduced by 071914232189735ae6475d44d07f11f90b4729a1 (macOS QML fix) for apparently historical reasons and has been found to cause various problems: - Flicker when using QGLWidget in a QSplitter - (obscure) crashes due to flushing out input events in setVisible(). Task-number: QTBUG-38327 Task-number: QTBUG-39842 Change-Id: I18081da5f4645271774a51f1d6a88e778adbd6ac Reviewed-by: Gabriel de Dietrich <> Reviewed-by: Joerg Bornemann <>
Diffstat (limited to 'src')
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 40229d00af..0028ad1bd0 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1622,7 +1622,8 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
if (message == WM_ERASEBKGND) // Backing store - ignored.
return true;
// Ignore invalid update bounding rectangles
- if (!GetUpdateRect(m_data.hwnd, 0, FALSE))
+ RECT updateRect;
+ if (!GetUpdateRect(m_data.hwnd, &updateRect, FALSE))
return false;
@@ -1646,7 +1647,7 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
// we still need to send isExposed=true, for compatibility.
// Our tests depend on it.
fireExpose(QRegion(qrectFromRECT(ps.rcPaint)), true);
- if (!QWindowsContext::instance()->asyncExpose())
+ if (qSizeOfRect(updateRect) == m_data.geometry.size() && !QWindowsContext::instance()->asyncExpose())
EndPaint(hwnd, &ps);