diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-08-01 18:32:51 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-08-07 22:29:06 +0200 |
commit | 774095ed9aea96e3a9e56441079735cd726c072a (patch) | |
tree | 64cfb92dc795534c926c5f6e66a865833ef7297f /src/gui/kernel/qpaintdevicewindow_p.h | |
parent | aa48e212d7920d3c675ca5ad6d1675b4f24fa1da (diff) |
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 <eirik.aavitsland@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/kernel/qpaintdevicewindow_p.h')
-rw-r--r-- | src/gui/kernel/qpaintdevicewindow_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
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: |