diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2021-01-06 14:04:27 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2021-01-13 07:27:55 +0000 |
commit | 5aa3cf7b9a9d2932c95f9fbcd89011c968f7426a (patch) | |
tree | e7cec707101f1c0b8a6598d70f440383c4c20077 | |
parent | a6aa9bca33dd6c0d0312ff50a547950530943cee (diff) |
Revert "Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for full update only"
This reverts commit a81dfb32d6f9e7a407567511c20b59e537f6a063.
Paint immediately on WM_PAINT in all cases in order to
avoid flicker on resize.
The cases mentioned in commit a81dfb should no longer
apply:
- QTBUG-38327: QGLWidget is not supported in Qt 6.
- QTBUG-39842: Fixed by using ExcludeUserInputEvents.
Fixes: QTBUG-89688
Change-Id: If82cf7703d6663982769048e86a7060223730ce7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 9f894788dda8407c6221aaa1491cd54a5a2b4cb7)
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 5987324ac1..f08375d45f 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -2125,8 +2125,7 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message, if (!window()->isVisible() && (GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED) != 0) return false; // Ignore invalid update bounding rectangles - RECT updateRect; - if (!GetUpdateRect(m_data.hwnd, &updateRect, FALSE)) + if (!GetUpdateRect(m_data.hwnd, 0, FALSE)) return false; PAINTSTRUCT ps; @@ -2148,7 +2147,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 (qSizeOfRect(updateRect) == m_data.geometry.size() && !QWindowsContext::instance()->asyncExpose()) + if (!QWindowsContext::instance()->asyncExpose()) QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); EndPaint(hwnd, &ps); |