summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qrasterwindow.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-08-01 18:39:10 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-09-22 23:47:41 +0200
commite0eb2818face4ffb7dafd87464f355d4654b7be0 (patch)
tree2e383c1ba07d7fd3206e3ac30d3070999d01b388 /src/gui/kernel/qrasterwindow.h
parent953e7eece8ca78986b86bb78ed8e977bf0260661 (diff)
Avoid extending dirty region in beginPaint
When the raster window is resized, we need to resize the backingstore, and make sure we repaint the entire window. We defer the backingstore resize to beginPaint, in case multiple resize events come in before we have a chance to paint, but we can't defer the invalidation of the paint device window, because QPaintDeviceWindowPrivate::paint() has already subtracted the paint region from its dirty region at this point. Invalidating yet again will result in the dirty region of window not clearing fully until after the final resize, and when that happens we will also repaint the window with the wrong dirty region, based on the window's original size. My moving the window invalidation to the resize event, while keeping the deferred backingstore resize we avoid this problem. Pick-to: 6.5 6.6 Change-Id: I44662778f5b1bcd259b20ca86124e6487561ef4f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/kernel/qrasterwindow.h')
-rw-r--r--src/gui/kernel/qrasterwindow.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qrasterwindow.h b/src/gui/kernel/qrasterwindow.h
index 05d71e1655..986bf6b511 100644
--- a/src/gui/kernel/qrasterwindow.h
+++ b/src/gui/kernel/qrasterwindow.h
@@ -23,6 +23,7 @@ public:
protected:
int metric(PaintDeviceMetric metric) const override;
QPaintDevice *redirected(QPoint *) const override;
+ void resizeEvent(QResizeEvent *event) override;
private:
Q_DISABLE_COPY(QRasterWindow)