summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-10-01 13:54:47 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-10-05 19:09:34 +0000
commitce369b75071958cac9bcdb38f61f3b8ffee9aa39 (patch)
tree8ca09ccfecd80f6a9853c5067de2870178771f6e /src
parent58c544ee5f7869f04d1b96a595bafc0f5768f0cd (diff)
xcb: Flush scrolled region of backingstore to client when requesting image
We were doing this for composeAndFlush already, which accesses the image via graphicsBuffer(). Task-number: QTBUG-64504 Task-number: QTBUG-64414 Change-Id: I51cc002db8a15991f8a8aa32e849c07318e6e74c Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 719990d4ef4729ba5e145306f555bcd73ea944e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index bfcd1b2320..4ef2d53343 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -842,7 +842,12 @@ QImage QXcbBackingStore::toImage() const
// If the backingstore is rgbSwapped, return the internal image type here.
if (!m_rgbImage.isNull())
return m_rgbImage;
- return m_image && m_image->image() ? *m_image->image() : QImage();
+
+ if (!m_image || !m_image->image())
+ return QImage();
+
+ m_image->flushScrolledRegion(true);
+ return *m_image->image();
}
QPlatformGraphicsBuffer *QXcbBackingStore::graphicsBuffer() const