summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-11-16 17:32:37 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-11-18 23:41:02 +0100
commit12af9ce6dbf4e523265c32edac7cd6c8ee006783 (patch)
tree244fb22669b2a3b0eaf8706aebf2e8b5f0a9321b /src/plugins/platforms
parent709a932d7be8a7ef4c86dbdf93da6b6b08a5ffe0 (diff)
xcb: Ensure we have pixmap GC before trying to flush to it during scroll
Pick-to: 6.2 Change-Id: Icc85b1eb830d8d9b1b2bfb8b9998470388522832 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 6fec282f29..b4993bfd17 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -491,13 +491,13 @@ bool QXcbBackingStoreImage::scroll(const QRegion &area, int dx, int dy)
for (const QRect &rect : scrollArea)
qt_scrollRectInImage(m_qimage, rect, delta);
} else {
+ ensureGC(m_xcb_pixmap);
+
if (hasShm())
shmPutImage(m_xcb_pixmap, m_pendingFlush.intersected(scrollArea));
else
flushPixmap(scrollArea);
- ensureGC(m_xcb_pixmap);
-
for (const QRect &src : scrollArea) {
const QRect dst = src.translated(delta).intersected(bounds);
xcb_copy_area(xcb_connection(),