Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwayland-server/, kde-plasma/kwayland-server/files/
Date: Tue, 17 May 2022 19:02:16
Message-Id: 1652814110.a7fd39ce68ebd8e986e84c9d5038eb440ac2731c.asturm@gentoo
1 commit: a7fd39ce68ebd8e986e84c9d5038eb440ac2731c
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 17 18:55:23 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue May 17 19:01:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7fd39ce
7
8 kde-plasma/kwayland-server: Fix supported action initialization
9
10 ...in data offer interface
11
12 Package-Manager: Portage-3.0.30, Repoman-3.0.3
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 ...d-server-5.24.5-fix-supported-action-init.patch | 44 ++++++++++++++++++++++
16 .../kwayland-server-5.24.5-r1.ebuild | 43 +++++++++++++++++++++
17 2 files changed, 87 insertions(+)
18
19 diff --git a/kde-plasma/kwayland-server/files/kwayland-server-5.24.5-fix-supported-action-init.patch b/kde-plasma/kwayland-server/files/kwayland-server-5.24.5-fix-supported-action-init.patch
20 new file mode 100644
21 index 000000000000..6e03d215ed43
22 --- /dev/null
23 +++ b/kde-plasma/kwayland-server/files/kwayland-server-5.24.5-fix-supported-action-init.patch
24 @@ -0,0 +1,44 @@
25 +From f669d7002b3966f53f8e17275123b24ec41e8e21 Mon Sep 17 00:00:00 2001
26 +From: Vlad Zahorodnii <vlad.zahorodnii@×××.org>
27 +Date: Mon, 16 May 2022 16:28:53 +0300
28 +Subject: [PATCH] wayland: Fix supported action initialization in data offer
29 + interface
30 +
31 +Currently we guess the supported and preferred dnd actions in data offer
32 +for version >= 3. This can create problems because kwin may not send the
33 +right action events when the supported dnd actions actually change.
34 +---
35 + src/server/dataoffer_interface.cpp | 10 +++++++---
36 + 1 file changed, 7 insertions(+), 3 deletions(-)
37 +
38 +diff --git a/src/server/dataoffer_interface.cpp b/src/server/dataoffer_interface.cpp
39 +index ed682172..d78abeca 100644
40 +--- a/src/server/dataoffer_interface.cpp
41 ++++ b/src/server/dataoffer_interface.cpp
42 +@@ -25,9 +25,8 @@ public:
43 + DataOfferInterface *q;
44 + QPointer<AbstractDataSource> source;
45 +
46 +- // defaults are set to sensible values for < version 3 interfaces
47 +- DataDeviceManagerInterface::DnDActions supportedDnDActions = DataDeviceManagerInterface::DnDAction::Copy | DataDeviceManagerInterface::DnDAction::Move;
48 +- DataDeviceManagerInterface::DnDAction preferredDnDAction = DataDeviceManagerInterface::DnDAction::Copy;
49 ++ DataDeviceManagerInterface::DnDActions supportedDnDActions = DataDeviceManagerInterface::DnDAction::None;
50 ++ DataDeviceManagerInterface::DnDAction preferredDnDAction = DataDeviceManagerInterface::DnDAction::None;
51 +
52 + protected:
53 + void data_offer_destroy_resource(Resource *resource) override;
54 +@@ -43,6 +42,11 @@ DataOfferInterfacePrivate::DataOfferInterfacePrivate(AbstractDataSource *_source
55 + , q(_q)
56 + , source(_source)
57 + {
58 ++ // defaults are set to sensible values for < version 3 interfaces
59 ++ if (wl_resource_get_version(resource) < WL_DATA_OFFER_ACTION_SINCE_VERSION) {
60 ++ supportedDnDActions = DataDeviceManagerInterface::DnDAction::Copy | DataDeviceManagerInterface::DnDAction::Move;
61 ++ preferredDnDAction = DataDeviceManagerInterface::DnDAction::Copy;
62 ++ }
63 + }
64 +
65 + void DataOfferInterfacePrivate::data_offer_accept(Resource *resource, uint32_t serial, const QString &mime_type)
66 +--
67 +GitLab
68 +
69
70 diff --git a/kde-plasma/kwayland-server/kwayland-server-5.24.5-r1.ebuild b/kde-plasma/kwayland-server/kwayland-server-5.24.5-r1.ebuild
71 new file mode 100644
72 index 000000000000..bba4549022b8
73 --- /dev/null
74 +++ b/kde-plasma/kwayland-server/kwayland-server-5.24.5-r1.ebuild
75 @@ -0,0 +1,43 @@
76 +# Copyright 1999-2022 Gentoo Authors
77 +# Distributed under the terms of the GNU General Public License v2
78 +
79 +EAPI=8
80 +
81 +ECM_QTHELP="true"
82 +ECM_TEST="true"
83 +KFMIN=5.90.0
84 +PVCUT=$(ver_cut 1-2)
85 +QTMIN=5.15.2
86 +inherit ecm kde.org
87 +
88 +DESCRIPTION="Wayland Server Components built on KDE Frameworks"
89 +HOMEPAGE="https://invent.kde.org/plasma/kwayland-server"
90 +
91 +LICENSE="LGPL-2.1"
92 +SLOT="5"
93 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
94 +IUSE=""
95 +
96 +# All failing, I guess we need a virtual wayland server
97 +RESTRICT="test"
98 +
99 +RDEPEND="
100 + >=dev-libs/wayland-1.19.0
101 + >=dev-qt/qtconcurrent-${QTMIN}:5
102 + >=dev-qt/qtgui-${QTMIN}:5[egl]
103 + >=dev-qt/qtwayland-${QTMIN}:5
104 + >=kde-frameworks/kwayland-${KFMIN}:5
105 + media-libs/libglvnd
106 +"
107 +DEPEND="${RDEPEND}
108 + >=dev-libs/plasma-wayland-protocols-1.6.0
109 + >=dev-libs/wayland-protocols-1.24
110 +"
111 +BDEPEND="
112 + >=dev-qt/qtwaylandscanner-${QTMIN}:5
113 + dev-util/wayland-scanner
114 +"
115 +
116 +PATCHES=(
117 + "${FILESDIR}"/${P}-fix-supported-action-init.patch
118 +)