summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp5
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;
PAINTSTRUCT ps;
@@ -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())
QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
EndPaint(hwnd, &ps);