public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/, dev-qt/qtwayland/files/
Date: Tue,  8 Aug 2023 20:22:59 +0000 (UTC)	[thread overview]
Message-ID: <1691526160.4b6ed90eaaf1519bb56933d52ff785e372acb2c3.asturm@gentoo> (raw)

commit:     4b6ed90eaaf1519bb56933d52ff785e372acb2c3
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  8 20:07:34 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Aug  8 20:22:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b6ed90e

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 <AT> gentoo.org>

 dev-qt/qtwayland/Manifest                          |  1 +
 ...5.15.10-QTBUG-95434-convert-cursor-bitmap.patch | 66 ++++++++++++++++++++++
 dev-qt/qtwayland/qtwayland-5.15.10-r2.ebuild       | 57 +++++++++++++++++++
 3 files changed, 124 insertions(+)

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
+}


             reply	other threads:[~2023-08-08 20:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 20:22 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-06-07 16:16 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/, dev-qt/qtwayland/files/ Ionen Wolkens
2025-02-27 11:56 Ionen Wolkens
2025-01-06 22:51 Ionen Wolkens
2024-10-08 17:46 Ionen Wolkens
2024-07-16 17:55 Ionen Wolkens
2023-11-15 19:28 Ionen Wolkens
2023-08-17 23:21 Ionen Wolkens
2023-08-16 16:31 Andreas Sturmlechner
2023-06-13 11:42 Andreas Sturmlechner
2023-03-09 15:02 Andreas Sturmlechner
2023-03-08 11:07 Andreas Sturmlechner
2022-04-17 19:29 Sam James
2022-03-21 11:27 Andreas Sturmlechner
2022-03-21 11:04 Andreas Sturmlechner
2022-01-22 12:20 Andreas Sturmlechner
2021-12-10 13:19 Andreas Sturmlechner
2021-01-07 16:31 Andreas Sturmlechner
2019-12-18 15:41 Andreas Sturmlechner
2019-11-20 21:21 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1691526160.4b6ed90eaaf1519bb56933d52ff785e372acb2c3.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox