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>
bb10
Tor Arne Vestbø 2021-11-16 17:32:37 +01:00
parent 709a932d7b
commit 12af9ce6db
1 changed files with 2 additions and 2 deletions

View File

@ -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(),