diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-08-08 22:07:34 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-08-08 22:22:40 +0200 |
commit | 4b6ed90eaaf1519bb56933d52ff785e372acb2c3 (patch) | |
tree | 09718276d93d7cd1895f3f7537c21b66ebcf4237 /dev-qt | |
parent | sys-cluster/nomad: add 1.6.1 (diff) | |
download | gentoo-4b6ed90eaaf1519bb56933d52ff785e372acb2c3.tar.gz gentoo-4b6ed90eaaf1519bb56933d52ff785e372acb2c3.tar.bz2 gentoo-4b6ed90eaaf1519bb56933d52ff785e372acb2c3.zip |
dev-qt/qtwayland: Bump to QT5_KDEPATCHSET_REV=2
Convert cursor bitmap to supported format
QTBUG: https://bugreports.qt.io/browse/QTBUG-95434
David Edmundson (1):
client: Fix crash on dnd updates after client facing drag ends
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=470925
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=472313
Closes: https://bugs.gentoo.org/910562
Closes: https://bugs.gentoo.org/911832
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r-- | dev-qt/qtwayland/Manifest | 1 | ||||
-rw-r--r-- | dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch | 66 | ||||
-rw-r--r-- | dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild | 57 |
3 files changed, 124 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest index 524ac95671b5..bdd8925e2519 100644 --- a/dev-qt/qtwayland/Manifest +++ b/dev-qt/qtwayland/Manifest @@ -1,3 +1,4 @@ DIST qtwayland-5.15.10-gentoo-kde-1.tar.xz 42480 BLAKE2B 3902ecb713b8f35922b0d19bef0b2ec340ca52feb4b61de629dfa6b344d7f550de3e509e265f4476eb907f78b55d5c50c21d9dfeeb7e2e8f680a43fffc911ed4 SHA512 6a131ca2db008a2d224ee6733f47d05a455a8487d38b45cf63882e98e2c29d8163ac5d2f2c2e043f03103bada6e212b5d33cbf11677f8ca2b86fdbf02fc2b239 +DIST qtwayland-5.15.10-gentoo-kde-2.tar.xz 43076 BLAKE2B 735ac875c0957de47f90d08931eaaaf8d53b1db0012c7d0a592c78ae78da56ffc8a1ba9bbac0577a78d4c05a92a22acef51a6afc95db54bea2d1a2a9658b67c4 SHA512 e0131bb1f2a09597a85d1d8a402bcb1d529cbc44f62e9be8dd8eba9c10007ca4f83572ca48052529b2325cdd8d886abed1f96ba4e00768e4b1c2febe1eb5ef91 DIST qtwayland-everywhere-opensource-src-5.15.10.tar.xz 568552 BLAKE2B c5cd4ed5ff78befb5bb49f9eb809562c418b2469aa0fa23728a1de46d57f42788bba3f87a54c8dda2ee0900c76b84213d1111fd86159dc5e6707f7b67ed386de SHA512 214b1fec7dfd815d148a7485f7811e623b06d172e58e4ee3167264a4e4b8f4aeec11474e574f91652a0bd3a48476a6747cad468f1e5035c49a55a96fc1400899 DIST qtwayland-everywhere-src-6.5.2.tar.xz 1059356 BLAKE2B 4708b78ff5c8e413edaa4d4400317f58dd068273a5eef7caf1500abf8afbe4e9ac405b6854691ef93265a7eeb0cfb7406024826a0b7c7ba3f8149218af67fd48 SHA512 520d109402f1d629481029a3b1eaab740e66135db4069c34651172bb2ad821b22de60e9956a96331d2f32a4522fc52c6a4ba99b474092d755760cad08c776477 diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch b/dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch new file mode 100644 index 000000000000..7b43ee3b2149 --- /dev/null +++ b/dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch @@ -0,0 +1,66 @@ +From dd5c9e2d894ca94faaeef7dfc3cc4344a7f62640 Mon Sep 17 00:00:00 2001 +From: Michael Weghorn <m.weghorn@posteo.de> +Date: Mon, 20 Feb 2023 14:02:23 +0100 +Subject: [PATCH] Convert cursor bitmap to supported format + +The 1-bit image formats QImage::Format_Mono and +QImage::Format_MonoLSB used by cursor bitmaps don't have +a corresponding wl_shm_format. + +Therefore, convert to a supported image format as necessary +to make such bitmap cursors work on Wayland as well. + +Fixes: QTBUG-95434 +Change-Id: I402fd870b301ddc01075251b66f2cf7cc1923133 +Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> +(cherry picked from commit 45ec1362f8fcb5ade92f4d2d4985b1c24e78c8ba) + +Backport changes: Use Qt::ReturnByValue version for QCursor::mask() and QCursor::bitmap() +--- + src/client/qwaylandcursor.cpp | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp +index e4eca9d4e..ba76ba2d0 100644 +--- a/src/client/qwaylandcursor.cpp ++++ b/src/client/qwaylandcursor.cpp +@@ -44,6 +44,7 @@ + #include "qwaylandshmbackingstore_p.h" + + #include <QtGui/QImageReader> ++#include <QBitmap> + #include <QDebug> + + #include <wayland-cursor.h> +@@ -250,7 +251,27 @@ QWaylandCursor::QWaylandCursor(QWaylandDisplay *display) + QSharedPointer<QWaylandBuffer> QWaylandCursor::cursorBitmapBuffer(QWaylandDisplay *display, const QCursor *cursor) + { + Q_ASSERT(cursor->shape() == Qt::BitmapCursor); +- const QImage &img = cursor->pixmap().toImage(); ++ ++ const QBitmap mask = cursor->mask(Qt::ReturnByValue); ++ QImage img; ++ if (cursor->pixmap().isNull()) ++ img = cursor->bitmap(Qt::ReturnByValue).toImage(); ++ else ++ img = cursor->pixmap().toImage(); ++ ++ // convert to supported format if necessary ++ if (!display->shm()->formatSupported(img.format())) { ++ if (mask.isNull()) { ++ img.convertTo(QImage::Format_RGB32); ++ } else { ++ // preserve mask ++ img.convertTo(QImage::Format_ARGB32); ++ QPixmap pixmap = QPixmap::fromImage(img); ++ pixmap.setMask(mask); ++ img = pixmap.toImage(); ++ } ++ } ++ + QSharedPointer<QWaylandShmBuffer> buffer(new QWaylandShmBuffer(display, img.size(), img.format())); + memcpy(buffer->image()->bits(), img.bits(), size_t(img.sizeInBytes())); + return buffer; +-- +GitLab + diff --git a/dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild b/dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild new file mode 100644 index 000000000000..9ca1a8b37a6f --- /dev/null +++ b/dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} != *9999* ]]; then + QT5_KDEPATCHSET_REV=2 + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +inherit qt5-build + +DESCRIPTION="Wayland platform plugin for Qt" + +SLOT=5/${QT5_PV} # bug 815646 +IUSE="vulkan X" + +DEPEND=" + dev-libs/wayland + =dev-qt/qtcore-${QT5_PV}*:5= + =dev-qt/qtdeclarative-${QT5_PV}*:5= + =dev-qt/qtgui-${QT5_PV}*:5=[egl,libinput,vulkan=,X?] + media-libs/libglvnd + vulkan? ( dev-util/vulkan-headers ) + X? ( + =dev-qt/qtgui-${QT5_PV}*[-gles2-only] + x11-libs/libX11 + x11-libs/libXcomposite + ) +" +RDEPEND="${DEPEND}" +BDEPEND="dev-util/wayland-scanner" + +PATCHES=( + # QTBUG-97037, pending upstream: + # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/71 + "${FILESDIR}/${PN}-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch" + "${FILESDIR}/${P}-send-release-button-event-on-pointer-leave.patch" + # QTBUG-95434, pending/approved upstream: + # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/79 + "${FILESDIR}/${P}-QTBUG-95434-convert-cursor-bitmap.patch" +) + +src_configure() { + local myqmakeargs=( + -- + $(qt_use vulkan feature-wayland-vulkan-server-buffer) + $(qt_use X feature-xcomposite-egl) + $(qt_use X feature-xcomposite-glx) + ) + qt5-build_src_configure +} + +src_install() { + qt5-build_src_install + rm "${D}${QT5_BINDIR}"/qtwaylandscanner || die +} |