From 774095ed9aea96e3a9e56441079735cd726c072a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 1 Aug 2023 18:32:51 +0200 Subject: [PATCH] Don't keep around old dirty region when entire window is invalidated QPaintDeviceWindowPrivate::markWindowAsDirty() is used to signal that the entire window needs repaint, for example when the window is being resized. If multiple resize events come in before we have a chance to redraw the window, we'll end up redrawing the window based on the window's current size and exposed region, as we should, but we'll still have a dirty region, because we didn't redraw the window at any of its old (larger) sizes. Resetting the dirty region instead of appending to it should be enough. Pick-to: 6.6 6.5 Change-Id: I37443cc1044779f847348a2303a6cebc1a8f3bcb Reviewed-by: Eirik Aavitsland Reviewed-by: Laszlo Agocs --- src/gui/kernel/qpaintdevicewindow_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qpaintdevicewindow_p.h b/src/gui/kernel/qpaintdevicewindow_p.h index 32db2cb7a4..2fdac02e0a 100644 --- a/src/gui/kernel/qpaintdevicewindow_p.h +++ b/src/gui/kernel/qpaintdevicewindow_p.h @@ -82,7 +82,7 @@ public: void markWindowAsDirty() { Q_Q(QPaintDeviceWindow); - dirtyRegion += QRect(QPoint(0, 0), q->size()); + dirtyRegion = QRect(QPoint(0, 0), q->size()); } private: