summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 7330c3c9a3..bfcd1b2320 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -710,9 +710,10 @@ void QXcbBackingStoreImage::put(xcb_drawable_t dst, const QRegion &region, const
Q_ASSERT(!m_clientSideScroll);
ensureGC(dst);
- setClip(region);
if (hasShm()) {
+ setClip(region); // Clip in window local coordinates
+
// Copy scrolled area on server-side from pixmap to window
const QRegion scrolledRegion = m_scrolledRegion.translated(-offset);
for (const QRect &rect : scrolledRegion) {
@@ -733,7 +734,15 @@ void QXcbBackingStoreImage::put(xcb_drawable_t dst, const QRegion &region, const
const QRect bounds = region.boundingRect();
const QPoint target = bounds.topLeft();
const QRect source = bounds.translated(offset);
- flushPixmap(region);
+
+ // First clip in backingstore-local coordinates, and upload
+ // the changed parts of the backingstore to the server.
+ setClip(source);
+ flushPixmap(source);
+
+ // Then clip in window local coordinates, and copy the updated
+ // parts of the backingstore image server-side to the window.
+ setClip(region);
xcb_copy_area(xcb_connection(),
m_xcb_pixmap,
dst,