summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindowsurface.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
index 27912cc..ad91c34 100644
--- a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
@@ -99,8 +99,17 @@ void QXcbWindowSurface::resize(const QSize &size)
m_image = QImage(size, QImage::Format_RGB32);
}
+extern void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset);
+
bool QXcbWindowSurface::scroll(const QRegion &area, int dx, int dy)
{
- return false;
+ if (m_image.isNull())
+ return false;
+
+ const QVector<QRect> rects = area.rects();
+ for (int i = 0; i < rects.size(); ++i)
+ qt_scrollRectInImage(m_image, rects.at(i), QPoint(dx, dy));
+
+ return true;
}