[neon/qt6/qt6-base/Neon/release] debian/patches: add kai's qwaylandcursor fix
Carlos De Maine
null at kde.org
Fri May 15 11:00:33 BST 2026
Git commit b8a11b3b20c7a43f2c6bebd8e446a84c9fec5b37 by Carlos De Maine.
Committed on 15/05/2026 at 10:00.
Pushed by carlosdem into branch 'Neon/release'.
add kai's qwaylandcursor fix
A +20 -0 debian/patches/0004-qwaylandcursor.diff
M +1 -0 debian/patches/series
https://invent.kde.org/neon/qt6/qt6-base/-/commit/b8a11b3b20c7a43f2c6bebd8e446a84c9fec5b37
diff --git a/debian/patches/0004-qwaylandcursor.diff b/debian/patches/0004-qwaylandcursor.diff
new file mode 100644
index 0000000..78b5f10
--- /dev/null
+++ b/debian/patches/0004-qwaylandcursor.diff
@@ -0,0 +1,20 @@
+diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp
+index 42b7949e4d3..0fe273f3771 100644
+--- a/src/plugins/platforms/wayland/qwaylandcursor.cpp
++++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp
+@@ -308,7 +308,15 @@ QSharedPointer<QWaylandBuffer> QWaylandCursor::cursorBitmapBuffer(QWaylandDispla
+ }
+
+ QSharedPointer<QWaylandShmBuffer> buffer(new QWaylandShmBuffer(display, img.size(), img.format()));
+- memcpy(buffer->image()->bits(), img.bits(), size_t(img.sizeInBytes()));
++ // The stride of the QWaylandShmBuffer image might be different to improve performance.
++ if (buffer->image()->bytesPerLine() != img.bytesPerLine()) {
++ const size_t bytesPerLine = img.width() * (img.depth() / 8);
++ for (int y = 0; y < img.height(); ++y) {
++ memcpy(buffer->image()->scanLine(y), img.constScanLine(y), bytesPerLine);
++ }
++ } else {
++ memcpy(buffer->image()->bits(), img.bits(), size_t(img.sizeInBytes()));
++ }
+ return buffer;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 113f896..aa23332 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
0001-fix-slow-scrolling-on-wayland.patch
0002-c93008e4d06abb0072e0e5e57d84a4ae182ecfc0.patch
0003-qwaylandshmbackingstore.diff
+0004-qwaylandcursor.diff
# Needs to be fixed upstream.
Add-SH-detection.patch
More information about the Neon-commits
mailing list