* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/
@ 2023-10-03 15:29 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-10-03 15:29 UTC (permalink / raw
To: gentoo-commits
commit: 1dccc0a025ec5d2454a858bf309d561b97ce974e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 3 15:25:02 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 3 15:29:41 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dccc0a0
kde-plasma/xdg-desktop-portal-kde: backport GTK settings fix
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=474746
Closes: https://bugs.gentoo.org/915111
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-kde-5.27.8-fallback-gtk-portals-settings.patch | 29 ++++++++++
.../xdg-desktop-portal-kde-5.27.8-r1.ebuild | 64 ++++++++++++++++++++++
2 files changed, 93 insertions(+)
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.27.8-fallback-gtk-portals-settings.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.27.8-fallback-gtk-portals-settings.patch
new file mode 100644
index 000000000000..22afdbc240bf
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.27.8-fallback-gtk-portals-settings.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/915111
+https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/33f8d622559a59fa01e4099f5623af7d001de549
+
+From 33f8d622559a59fa01e4099f5623af7d001de549 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= <tim@siosm.fr>
+Date: Fri, 22 Sep 2023 20:17:55 +0200
+Subject: [PATCH] data/kde-portals.conf: Fallback to GTK portals for Settings
+
+Add a fallback to the GTK portal for Settings. This makes sure that GTK
+apps always get valid fonts and related settings.
+
+See: https://bugzilla.redhat.com/2240211
+See: https://pagure.io/fedora-kde/SIG/issue/396
+See: https://github.com/flatpak/xdg-desktop-portal/issues/1017
+See: https://github.com/flatpak/xdg-desktop-portal/issues/1112
+See: https://bugs.kde.org/show_bug.cgi?id=474746
+
+BUG: 474746
+
+See: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/231
+(cherry picked from commit 93f96d31d14a88b45065a21616135a126131c579)
+--- a/data/kde-portals.conf
++++ b/data/kde-portals.conf
+@@ -1,2 +1,3 @@
+ [preferred]
+ default=kde
++org.freedesktop.impl.portal.Settings=kde;gtk;
+--
+GitLab
diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.27.8-r1.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.27.8-r1.ebuild
new file mode 100644
index 000000000000..3a90e13b0256
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.27.8-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="forceoptional"
+KFMIN=5.106.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.9
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks"
+
+LICENSE="LGPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE=""
+
+# dev-qt/qtgui: QtXkbCommonSupport is provided by either IUSE libinput or X
+COMMON_DEPEND="
+ >=dev-libs/wayland-1.15
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ || (
+ >=dev-qt/qtgui-${QTMIN}:5[libinput]
+ >=dev-qt/qtgui-${QTMIN}:5[X]
+ )
+ >=dev-qt/qtprintsupport-${QTMIN}:5[cups]
+ >=dev-qt/qtwayland-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5[dbus]
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/kguiaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kwayland-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ x11-libs/libxkbcommon
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/plasma-wayland-protocols-1.7.0
+ >=dev-libs/wayland-protocols-1.25
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+"
+RDEPEND="${COMMON_DEPEND}
+ kde-misc/kio-fuse:5
+ sys-apps/xdg-desktop-portal
+"
+BDEPEND="
+ >=dev-qt/qtwaylandscanner-${QTMIN}:5
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.27.8-fallback-gtk-portals-settings.patch
+)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/
@ 2023-05-22 12:55 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2023-05-22 12:55 UTC (permalink / raw
To: gentoo-commits
commit: 668dab41462115a17f318bb2d1c87bc81a2e85e3
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon May 22 09:06:17 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon May 22 12:53:49 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=668dab41
kde-plasma/xdg-desktop-portal-kde: drop 5.27.4.1-r1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
kde-plasma/xdg-desktop-portal-kde/Manifest | 1 -
...e-5.27.4.1-dont-try-to-screencast-nullptr.patch | 36 -------------
.../xdg-desktop-portal-kde-5.27.4.1-r1.ebuild | 61 ----------------------
3 files changed, 98 deletions(-)
diff --git a/kde-plasma/xdg-desktop-portal-kde/Manifest b/kde-plasma/xdg-desktop-portal-kde/Manifest
index fc32e026a846..90d5fad8a4d1 100644
--- a/kde-plasma/xdg-desktop-portal-kde/Manifest
+++ b/kde-plasma/xdg-desktop-portal-kde/Manifest
@@ -1,2 +1 @@
-DIST xdg-desktop-portal-kde-5.27.4.1.tar.xz 139188 BLAKE2B 93b4b6d39cae50a96e5bbc8422071da8cc53bdb21de2f709957656b75f5e538f52b86ddb47c653ff7beb27ff4e2f96cfe700de4d179ebddaf616c4a460d24a5c SHA512 c5fa02bc3c4df8a06ba8c91f236e8542f65daa8e68db08cc13a8c0e814e585f043571744db6b56b963eca3c939d8efed5f4cb085d046101df29536433d1ca001
DIST xdg-desktop-portal-kde-5.27.5.tar.xz 140720 BLAKE2B 8f55edc2c8416f51f04c6585db31d4b26fceacfefbfd1eeccf97809b20f58766b6a102d48bf12822e6dd25d7ce9b8c4b901b2d75d1b3706d7cb426aec15154d2 SHA512 98dd88559b294922122bd8ed9d6d5a451f9649b946fdb0023349eae204ce6ea2328572975382e05283b177da0d44ca1e99f7576dc14a4c095d8a88b163acffa0
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.27.4.1-dont-try-to-screencast-nullptr.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.27.4.1-dont-try-to-screencast-nullptr.patch
deleted file mode 100644
index 85d71e3951dc..000000000000
--- a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.27.4.1-dont-try-to-screencast-nullptr.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 58313fac8188163c9445bb9a212405412258ef5e Mon Sep 17 00:00:00 2001
-From: Aleix Pol Gonzalez <aleixpol@kde.org>
-Date: Wed, 5 Apr 2023 16:36:48 +0000
-Subject: [PATCH] screencast: Don't try to screencast nullptr
-
-For some reason we were received an output that was null. Account for it
-by notifying and outputing some more information in hopes of fixing it
-soon.
-
-CCBUG: 467622
----
- src/waylandintegration.cpp | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/waylandintegration.cpp b/src/waylandintegration.cpp
-index c929b030..be6e19f7 100644
---- a/src/waylandintegration.cpp
-+++ b/src/waylandintegration.cpp
-@@ -282,6 +282,14 @@ WaylandIntegration::Stream WaylandIntegration::WaylandIntegrationPrivate::startS
- WaylandIntegration::Stream WaylandIntegration::WaylandIntegrationPrivate::startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode)
- {
- auto output = m_outputMap.value(outputName).output();
-+ if (!output) {
-+ qCWarning(XdgDesktopPortalKdeWaylandIntegration) << "Cannot stream, output not found" << outputName << m_outputMap.keys();
-+ auto notification = new KNotification(QStringLiteral("screencastfailure"), KNotification::CloseOnTimeout);
-+ notification->setTitle(i18n("Failed to start screencasting"));
-+ notification->setIconName(QStringLiteral("dialog-error"));
-+ notification->sendEvent();
-+ return {};
-+ }
- m_streamedScreenPosition = output->globalPosition();
- return startStreaming(m_screencasting->createOutputStream(output.data(), mode),
- {
---
-GitLab
-
diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.27.4.1-r1.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.27.4.1-r1.ebuild
deleted file mode 100644
index 292270a6c1b8..000000000000
--- a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.27.4.1-r1.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_TEST="forceoptional"
-KFMIN=5.102.0
-PVCUT=$(ver_cut 1-3)
-QTMIN=5.15.7
-inherit ecm plasma.kde.org
-
-DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks"
-
-LICENSE="LGPL-2+"
-SLOT="5"
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
-IUSE=""
-
-# dev-qt/qtgui: QtXkbCommonSupport is provided by either IUSE libinput or X
-COMMON_DEPEND="
- >=dev-libs/wayland-1.15
- >=dev-qt/qtdbus-${QTMIN}:5
- >=dev-qt/qtdeclarative-${QTMIN}:5
- || (
- >=dev-qt/qtgui-${QTMIN}:5[libinput]
- >=dev-qt/qtgui-${QTMIN}:5[X]
- )
- >=dev-qt/qtprintsupport-${QTMIN}:5[cups]
- >=dev-qt/qtwayland-${QTMIN}:5
- >=dev-qt/qtwidgets-${QTMIN}:5
- >=kde-frameworks/kcoreaddons-${KFMIN}:5[dbus]
- >=kde-frameworks/kconfig-${KFMIN}:5
- >=kde-frameworks/kdeclarative-${KFMIN}:5
- >=kde-frameworks/kglobalaccel-${KFMIN}:5
- >=kde-frameworks/kguiaddons-${KFMIN}:5
- >=kde-frameworks/ki18n-${KFMIN}:5
- >=kde-frameworks/kiconthemes-${KFMIN}:5
- >=kde-frameworks/kio-${KFMIN}:5
- >=kde-frameworks/kirigami-${KFMIN}:5
- >=kde-frameworks/knotifications-${KFMIN}:5
- >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
- >=kde-frameworks/kwindowsystem-${KFMIN}:5
- >=kde-frameworks/kwayland-${KFMIN}:5
- >=kde-frameworks/plasma-${KFMIN}:5
- x11-libs/libxkbcommon
-"
-DEPEND="${COMMON_DEPEND}
- >=dev-libs/plasma-wayland-protocols-1.7.0
- >=dev-libs/wayland-protocols-1.25
- >=dev-qt/qtconcurrent-${QTMIN}:5
-"
-RDEPEND="${COMMON_DEPEND}
- kde-misc/kio-fuse:5
- sys-apps/xdg-desktop-portal
-"
-BDEPEND="
- >=dev-qt/qtwaylandscanner-${QTMIN}:5
- virtual/pkgconfig
-"
-
-PATCHES=( "${FILESDIR}/${P}-dont-try-to-screencast-nullptr.patch" ) # KDE-bug 467622
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/
@ 2022-05-30 16:09 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-05-30 16:09 UTC (permalink / raw
To: gentoo-commits
commit: 7437df3200a260f6c048ca2455793e6cc0fbc461
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 15:45:53 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon May 30 16:09:04 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7437df32
kde-plasma/xdg-desktop-portal-kde: Backport 5.24.6 screencast fixes
See also:
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/102
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/103
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...ast-close-only-streams-of-closing-session.patch | 107 ++++++
...eencast-dont-provide-every-running-stream.patch | 358 +++++++++++++++++++++
...de-5.24.5-screencast-stop-stream-actively.patch | 28 ++
.../xdg-desktop-portal-kde-5.24.5-r2.ebuild | 51 +++
4 files changed, 544 insertions(+)
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-close-only-streams-of-closing-session.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-close-only-streams-of-closing-session.patch
new file mode 100644
index 000000000000..134f55c900b5
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-close-only-streams-of-closing-session.patch
@@ -0,0 +1,107 @@
+From cd8275c722aa25dd22353121131c914d3ab3b438 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Sat, 28 May 2022 03:36:14 +0200
+Subject: [PATCH] screencast: When closing a session, only close the streams
+ from that session
+
+---
+ src/screencast.cpp | 11 ++++++++---
+ src/session.h | 12 ++++++++++++
+ src/waylandintegration.cpp | 5 +++++
+ src/waylandintegration.h | 1 +
+ 4 files changed, 26 insertions(+), 3 deletions(-)
+
+diff --git a/src/screencast.cpp b/src/screencast.cpp
+index 5be6210..84cc4bd 100644
+--- a/src/screencast.cpp
++++ b/src/screencast.cpp
+@@ -68,8 +68,12 @@ uint ScreenCastPortal::CreateSession(const QDBusObjectPath &handle,
+ return 2;
+ }
+
+- connect(session, &Session::closed, []() {
+- WaylandIntegration::stopAllStreaming();
++ connect(session, &Session::closed, [session] {
++ auto screencastSession = qobject_cast<ScreenCastSession *>(session);
++ const auto streams = screencastSession->streams();
++ for (const WaylandIntegration::Stream &stream : streams) {
++ WaylandIntegration::stopStreaming(stream.nodeId);
++ }
+ });
+
+ connect(WaylandIntegration::waylandIntegration(), &WaylandIntegration::WaylandIntegration::streamingStopped, session, &Session::close);
+@@ -169,7 +173,8 @@ uint ScreenCastPortal::Start(const QDBusObjectPath &handle,
+ return 2;
+ }
+
+- results.insert(QStringLiteral("streams"), QVariant::fromValue(streams));
++ session->setStreams(streams);
++ results.insert(QStringLiteral("streams"), QVariant::fromValue<WaylandIntegration::Streams>(streams));
+
+ if (inhibitionsEnabled()) {
+ new NotificationInhibition(app_id, i18nc("Do not disturb mode is enabled because...", "Screen sharing in progress"), session);
+diff --git a/src/session.h b/src/session.h
+index a42222e..dd05680 100644
+--- a/src/session.h
++++ b/src/session.h
+@@ -14,6 +14,7 @@
+
+ #include "remotedesktop.h"
+ #include "screencast.h"
++#include "waylandintegration.h"
+
+ class Session : public QDBusVirtualObject
+ {
+@@ -62,10 +63,21 @@ public:
+ return SessionType::ScreenCast;
+ }
+
++ WaylandIntegration::Streams streams() const
++ {
++ return m_streams;
++ }
++ void setStreams(const WaylandIntegration::Streams &streams)
++ {
++ m_streams = streams;
++ }
++
+ private:
+ bool m_multipleSources;
+ ScreenCastPortal::CursorModes m_cursorMode;
+ ScreenCastPortal::SourceType m_types;
++
++ WaylandIntegration::Streams m_streams;
+ };
+
+ class RemoteDesktopSession : public ScreenCastSession
+diff --git a/src/waylandintegration.cpp b/src/waylandintegration.cpp
+index 9f5a177..e05f73a 100644
+--- a/src/waylandintegration.cpp
++++ b/src/waylandintegration.cpp
+@@ -89,6 +89,11 @@ void WaylandIntegration::stopAllStreaming()
+ globalWaylandIntegration->stopAllStreaming();
+ }
+
++void WaylandIntegration::stopStreaming(uint node)
++{
++ globalWaylandIntegration->stopStreaming(node);
++}
++
+ void WaylandIntegration::requestPointerButtonPress(quint32 linuxButton)
+ {
+ globalWaylandIntegration->requestPointerButtonPress(linuxButton);
+diff --git a/src/waylandintegration.h b/src/waylandintegration.h
+index b8e6a00..784ee12 100644
+--- a/src/waylandintegration.h
++++ b/src/waylandintegration.h
+@@ -131,6 +131,7 @@ void startStreamingInput();
+ Stream startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode);
+ Stream startStreamingWindow(const QMap<int, QVariant> &win);
+ void stopAllStreaming();
++void stopStreaming(uint node);
+
+ void requestPointerButtonPress(quint32 linuxButton);
+ void requestPointerButtonRelease(quint32 linuxButton);
+--
+GitLab
+
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-dont-provide-every-running-stream.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-dont-provide-every-running-stream.patch
new file mode 100644
index 000000000000..6aa94ccb7f69
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-dont-provide-every-running-stream.patch
@@ -0,0 +1,358 @@
+From 3dbd366516c38d987025623feea18f79c15d72dd Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Mon, 30 May 2022 15:42:02 +0200
+Subject: [PATCH] Backport of 5f7fe7482ae3de6e5dabbd2712c283439b0eecac
+
+Since the codebases had diverged over time, I've backported it by hand
+using the same concepts as the forementioned fix, trying to minimise the
+delta with the latest released Plasma 5.24.
+---
+ src/remotedesktop.cpp | 12 ++------
+ src/screencast.cpp | 15 ++++++----
+ src/waylandintegration.cpp | 60 +++++++++++++++-----------------------
+ src/waylandintegration.h | 26 +++++++++++++++--
+ src/waylandintegration_p.h | 15 ++--------
+ 5 files changed, 61 insertions(+), 67 deletions(-)
+
+diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp
+index f36def4..9282ff0 100644
+--- a/src/remotedesktop.cpp
++++ b/src/remotedesktop.cpp
+@@ -122,20 +122,14 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
+
+ if (remoteDesktopDialog->exec()) {
+ if (session->screenSharingEnabled()) {
+- if (!WaylandIntegration::startStreamingOutput(remoteDesktopDialog->selectedScreens().first(), Screencasting::Hidden)) {
++ auto stream = WaylandIntegration::startStreamingOutput(remoteDesktopDialog->selectedScreens().first(), Screencasting::Hidden);
++ if (!stream.isValid()) {
+ return 2;
+ }
+
+ WaylandIntegration::authenticate();
+
+- QVariant streams = WaylandIntegration::streams();
+-
+- if (!streams.isValid()) {
+- qCWarning(XdgDesktopPortalKdeRemoteDesktop()) << "Pipewire stream is not ready to be streamed";
+- return 2;
+- }
+-
+- results.insert(QStringLiteral("streams"), streams);
++ results.insert(QStringLiteral("streams"), QVariant::fromValue<WaylandIntegration::Streams>({stream}));
+ } else {
+ qCWarning(XdgDesktopPortalKdeRemoteDesktop()) << "Only stream input";
+ WaylandIntegration::startStreamingInput();
+diff --git a/src/screencast.cpp b/src/screencast.cpp
+index 210bbbb..5be6210 100644
+--- a/src/screencast.cpp
++++ b/src/screencast.cpp
+@@ -147,26 +147,29 @@ uint ScreenCastPortal::Start(const QDBusObjectPath &handle,
+
+ if (screenDialog->exec()) {
+ const auto selectedScreens = screenDialog->selectedScreens();
++ WaylandIntegration::Streams streams;
+ for (quint32 outputid : selectedScreens) {
+- if (!WaylandIntegration::startStreamingOutput(outputid, Screencasting::CursorMode(session->cursorMode()))) {
++ auto stream = WaylandIntegration::startStreamingOutput(outputid, Screencasting::CursorMode(session->cursorMode()));
++ if (!stream.isValid()) {
+ return 2;
+ }
++ streams << stream;
+ }
+ const auto selectedWindows = screenDialog->selectedWindows();
+ for (const auto &win : selectedWindows) {
+- if (!WaylandIntegration::startStreamingWindow(win)) {
++ auto stream = WaylandIntegration::startStreamingWindow(win);
++ if (!stream.isValid()) {
+ return 2;
+ }
++ streams << stream;
+ }
+
+- QVariant streams = WaylandIntegration::streams();
+-
+- if (!streams.isValid()) {
++ if (streams.isEmpty()) {
+ qCWarning(XdgDesktopPortalKdeScreenCast) << "Pipewire stream is not ready to be streamed";
+ return 2;
+ }
+
+- results.insert(QStringLiteral("streams"), streams);
++ results.insert(QStringLiteral("streams"), QVariant::fromValue(streams));
+
+ if (inhibitionsEnabled()) {
+ new NotificationInhibition(app_id, i18nc("Do not disturb mode is enabled because...", "Screen sharing in progress"), session);
+diff --git a/src/waylandintegration.cpp b/src/waylandintegration.cpp
+index 44d862a..9f5a177 100644
+--- a/src/waylandintegration.cpp
++++ b/src/waylandintegration.cpp
+@@ -43,7 +43,7 @@ Q_LOGGING_CATEGORY(XdgDesktopPortalKdeWaylandIntegration, "xdp-kde-wayland-integ
+
+ Q_GLOBAL_STATIC(WaylandIntegration::WaylandIntegrationPrivate, globalWaylandIntegration)
+
+-static QDebug operator<<(QDebug dbg, const WaylandIntegration::WaylandIntegrationPrivate::Stream &c)
++static QDebug operator<<(QDebug dbg, const WaylandIntegration::Stream &c)
+ {
+ dbg.nospace() << "Stream(" << c.map << ", " << c.nodeId << ")";
+ return dbg.space();
+@@ -74,12 +74,12 @@ void WaylandIntegration::startStreamingInput()
+ globalWaylandIntegration->startStreamingInput();
+ }
+
+-bool WaylandIntegration::startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode)
++WaylandIntegration::Stream WaylandIntegration::startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode)
+ {
+ return globalWaylandIntegration->startStreamingOutput(outputName, mode);
+ }
+
+-bool WaylandIntegration::startStreamingWindow(const QMap<int, QVariant> &win)
++WaylandIntegration::Stream WaylandIntegration::startStreamingWindow(const QMap<int, QVariant> &win)
+ {
+ return globalWaylandIntegration->startStreamingWindow(win);
+ }
+@@ -124,11 +124,6 @@ QMap<quint32, WaylandIntegration::WaylandOutput> WaylandIntegration::screens()
+ return globalWaylandIntegration->screens();
+ }
+
+-QVariant WaylandIntegration::streams()
+-{
+- return globalWaylandIntegration->streams();
+-}
+-
+ // Thank you kscreen
+ void WaylandIntegration::WaylandOutput::setOutputType(const QString &type)
+ {
+@@ -157,7 +152,9 @@ void WaylandIntegration::WaylandOutput::setOutputType(const QString &type)
+ }
+ }
+
+-const QDBusArgument &operator>>(const QDBusArgument &arg, WaylandIntegration::WaylandIntegrationPrivate::Stream &stream)
++namespace WaylandIntegration
++{
++const QDBusArgument &operator>>(const QDBusArgument &arg, Stream &stream)
+ {
+ arg.beginStructure();
+ arg >> stream.nodeId;
+@@ -177,7 +174,7 @@ const QDBusArgument &operator>>(const QDBusArgument &arg, WaylandIntegration::Wa
+ return arg;
+ }
+
+-const QDBusArgument &operator<<(QDBusArgument &arg, const WaylandIntegration::WaylandIntegrationPrivate::Stream &stream)
++const QDBusArgument &operator<<(QDBusArgument &arg, const Stream &stream)
+ {
+ arg.beginStructure();
+ arg << stream.nodeId;
+@@ -186,9 +183,7 @@ const QDBusArgument &operator<<(QDBusArgument &arg, const WaylandIntegration::Wa
+
+ return arg;
+ }
+-
+-Q_DECLARE_METATYPE(WaylandIntegration::WaylandIntegrationPrivate::Stream)
+-Q_DECLARE_METATYPE(WaylandIntegration::WaylandIntegrationPrivate::Streams)
++}
+
+ KWayland::Client::PlasmaWindowManagement *WaylandIntegration::plasmaWindowManagement()
+ {
+@@ -207,8 +202,8 @@ WaylandIntegration::WaylandIntegrationPrivate::WaylandIntegrationPrivate()
+ , m_fakeInput(nullptr)
+ , m_screencasting(nullptr)
+ {
+- qDBusRegisterMetaType<WaylandIntegrationPrivate::Stream>();
+- qDBusRegisterMetaType<WaylandIntegrationPrivate::Streams>();
++ qDBusRegisterMetaType<Stream>();
++ qDBusRegisterMetaType<Streams>();
+ }
+
+ WaylandIntegration::WaylandIntegrationPrivate::~WaylandIntegrationPrivate() = default;
+@@ -228,25 +223,25 @@ void WaylandIntegration::WaylandIntegrationPrivate::startStreamingInput()
+ m_streamInput = true;
+ }
+
+-bool WaylandIntegration::WaylandIntegrationPrivate::startStreamingWindow(const QMap<int, QVariant> &win)
++WaylandIntegration::Stream WaylandIntegration::WaylandIntegrationPrivate::startStreamingWindow(const QMap<int, QVariant> &win)
+ {
+ auto uuid = win[KWayland::Client::PlasmaWindowModel::Uuid].toString();
+ return startStreaming(m_screencasting->createWindowStream(uuid, Screencasting::Hidden), {}, win);
+ }
+
+-bool WaylandIntegration::WaylandIntegrationPrivate::startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode)
++WaylandIntegration::Stream WaylandIntegration::WaylandIntegrationPrivate::startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode)
+ {
+ auto output = m_outputMap.value(outputName).output();
+
+ return startStreaming(m_screencasting->createOutputStream(output.data(), mode), output, {});
+ }
+
+-bool WaylandIntegration::WaylandIntegrationPrivate::startStreaming(ScreencastingStream *stream,
+- QSharedPointer<KWayland::Client::Output> output,
+- const QMap<int, QVariant> &win)
++WaylandIntegration::Stream WaylandIntegration::WaylandIntegrationPrivate::startStreaming(ScreencastingStream *stream,
++ QSharedPointer<KWayland::Client::Output> output,
++ const QMap<int, QVariant> &win)
+ {
+ QEventLoop loop;
+- bool streamReady = false;
++ Stream ret;
+ connect(stream, &ScreencastingStream::failed, this, [&](const QString &error) {
+ qCWarning(XdgDesktopPortalKdeWaylandIntegration) << "failed to start streaming" << stream << error;
+
+@@ -255,30 +250,26 @@ bool WaylandIntegration::WaylandIntegrationPrivate::startStreaming(Screencasting
+ notification->setText(error);
+ notification->setIconName(QStringLiteral("dialog-error"));
+ notification->sendEvent();
+-
+- streamReady = false;
+ loop.quit();
+ });
+ connect(stream, &ScreencastingStream::created, this, [&](uint32_t nodeid) {
+- Stream s;
+- s.stream = stream;
+- s.nodeId = nodeid;
++ ret.stream = stream;
++ ret.nodeId = nodeid;
+ if (output) {
+ m_streamedScreenPosition = output->globalPosition();
+- s.map = {
++ ret.map = {
+ {QLatin1String("size"), output->pixelSize()},
+ {QLatin1String("source_type"), static_cast<uint>(ScreenCastPortal::Monitor)},
+ };
+ } else {
+- s.map = {{QLatin1String("source_type"), static_cast<uint>(ScreenCastPortal::Window)}};
++ ret.map = {{QLatin1String("source_type"), static_cast<uint>(ScreenCastPortal::Window)}};
+ }
+- m_streams.append(s);
++ m_streams.append(ret);
+ startStreamingInput();
+
+ connect(stream, &ScreencastingStream::closed, this, [this, nodeid] {
+ stopStreaming(nodeid);
+ });
+- streamReady = true;
+
+ auto item = new KStatusNotifierItem(stream);
+ item->setStandardActionsEnabled(false);
+@@ -303,10 +294,10 @@ bool WaylandIntegration::WaylandIntegrationPrivate::startStreaming(Screencasting
+ QTimer::singleShot(3000, &loop, &QEventLoop::quit);
+ loop.exec();
+
+- return streamReady;
++ return ret;
+ }
+
+-void WaylandIntegration::WaylandIntegrationPrivate::Stream::close()
++void WaylandIntegration::Stream::close()
+ {
+ stream->deleteLater();
+ }
+@@ -390,11 +381,6 @@ QMap<quint32, WaylandIntegration::WaylandOutput> WaylandIntegration::WaylandInte
+ return m_outputMap;
+ }
+
+-QVariant WaylandIntegration::WaylandIntegrationPrivate::streams()
+-{
+- return QVariant::fromValue<WaylandIntegrationPrivate::Streams>(m_streams);
+-}
+-
+ void WaylandIntegration::WaylandIntegrationPrivate::authenticate()
+ {
+ if (!m_waylandAuthenticationRequested) {
+diff --git a/src/waylandintegration.h b/src/waylandintegration.h
+index 04319c9..b8e6a00 100644
+--- a/src/waylandintegration.h
++++ b/src/waylandintegration.h
+@@ -9,6 +9,7 @@
+ #ifndef XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_H
+ #define XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_H
+
++#include <QDBusArgument>
+ #include <QObject>
+ #include <QPoint>
+ #include <QSize>
+@@ -28,6 +29,23 @@ class ScreencastingSource;
+
+ namespace WaylandIntegration
+ {
++
++struct Stream {
++ ScreencastingStream *stream = nullptr;
++ uint nodeId;
++ QVariantMap map;
++
++ bool isValid() const
++ {
++ return stream != nullptr;
++ }
++
++ void close();
++};
++typedef QVector<Stream> Streams;
++const QDBusArgument &operator<<(QDBusArgument &arg, const Stream &stream);
++const QDBusArgument &operator>>(const QDBusArgument &arg, Stream &stream);
++
+ class WaylandOutput
+ {
+ public:
+@@ -110,8 +128,8 @@ bool isStreamingEnabled();
+ bool isStreamingAvailable();
+
+ void startStreamingInput();
+-bool startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode);
+-bool startStreamingWindow(const QMap<int, QVariant> &win);
++Stream startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode);
++Stream startStreamingWindow(const QMap<int, QVariant> &win);
+ void stopAllStreaming();
+
+ void requestPointerButtonPress(quint32 linuxButton);
+@@ -123,7 +141,6 @@ void requestPointerAxisDiscrete(Qt::Orientation axis, qreal delta);
+ void requestKeyboardKeycode(int keycode, bool state);
+
+ QMap<quint32, WaylandOutput> screens();
+-QVariant streams();
+
+ void init();
+
+@@ -132,4 +149,7 @@ KWayland::Client::PlasmaWindowManagement *plasmaWindowManagement();
+ WaylandIntegration *waylandIntegration();
+ }
+
++Q_DECLARE_METATYPE(WaylandIntegration::Stream)
++Q_DECLARE_METATYPE(WaylandIntegration::Streams)
++
+ #endif // XDG_DESKTOP_PORTAL_KDE_WAYLAND_INTEGRATION_H
+diff --git a/src/waylandintegration_p.h b/src/waylandintegration_p.h
+index 220ad3d..e95f6a0 100644
+--- a/src/waylandintegration_p.h
++++ b/src/waylandintegration_p.h
+@@ -53,15 +53,6 @@ private:
+ KWayland::Client::PlasmaWindowManagement *m_windowManagement = nullptr;
+
+ public:
+- struct Stream {
+- ScreencastingStream *stream = nullptr;
+- uint nodeId;
+- QVariantMap map;
+-
+- void close();
+- };
+- typedef QVector<Stream> Streams;
+-
+ void authenticate();
+
+ bool isStreamingEnabled() const;
+@@ -69,9 +60,9 @@ public:
+
+ void startStreamingInput();
+
+- bool startStreaming(ScreencastingStream *stream, QSharedPointer<KWayland::Client::Output> output, const QMap<int, QVariant> &win);
+- bool startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode);
+- bool startStreamingWindow(const QMap<int, QVariant> &win);
++ Stream startStreaming(ScreencastingStream *stream, QSharedPointer<KWayland::Client::Output> output, const QMap<int, QVariant> &win);
++ Stream startStreamingOutput(quint32 outputName, Screencasting::CursorMode mode);
++ Stream startStreamingWindow(const QMap<int, QVariant> &win);
+ void stopStreaming(uint32_t nodeid);
+ void stopAllStreaming();
+
+--
+GitLab
+
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-stop-stream-actively.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-stop-stream-actively.patch
new file mode 100644
index 000000000000..3c1284108b20
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-screencast-stop-stream-actively.patch
@@ -0,0 +1,28 @@
+From d74e7dce1d333107760a8ae8d2bdd7521d31a09f Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Sat, 28 May 2022 03:37:14 +0200
+Subject: [PATCH] screencast: When we stop a stream, do it actively
+
+We were just forgetting about it.
+
+
+(cherry picked from commit aa531bde14a13521f99ae8e44d6e83bc8749d761)
+---
+ src/waylandintegration.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/waylandintegration.cpp b/src/waylandintegration.cpp
+index b1b2d4d..44d862a 100644
+--- a/src/waylandintegration.cpp
++++ b/src/waylandintegration.cpp
+@@ -328,6 +328,7 @@ void WaylandIntegration::WaylandIntegrationPrivate::stopStreaming(uint32_t nodei
+ {
+ for (auto it = m_streams.begin(), itEnd = m_streams.end(); it != itEnd; ++it) {
+ if (it->nodeId == nodeid) {
++ it->close();
+ m_streams.erase(it);
+ break;
+ }
+--
+GitLab
+
diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.24.5-r2.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.24.5-r2.ebuild
new file mode 100644
index 000000000000..19da2f8c087b
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.24.5-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks"
+
+LICENSE="LGPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+COMMON_DEPEND="
+ >=dev-libs/wayland-1.15
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5[cups]
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kwayland-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/plasma-wayland-protocols-1.1.1
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/xdg-desktop-portal
+"
+BDEPEND=">=dev-qt/qtwaylandscanner-${QTMIN}:5"
+
+PATCHES=(
+ "${FILESDIR}/${P}-show-screenshare-notifier-more-prominently.patch" # KDE-bug 452980
+ "${FILESDIR}/${P}-screencast-stop-stream-actively.patch"
+ "${FILESDIR}/${P}-screencast-dont-provide-every-running-stream.patch"
+ "${FILESDIR}/${P}-screencast-close-only-streams-of-closing-session.patch"
+)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/
@ 2022-05-17 19:02 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-05-17 19:02 UTC (permalink / raw
To: gentoo-commits
commit: 53b24cf50996d78646160aeaa3bcb02dcc81a3bc
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue May 17 18:53:59 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue May 17 19:01:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53b24cf5
kde-plasma/xdg-desktop-portal-kde: Show screensharing notifier
...more prominently
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...how-screenshare-notifier-more-prominently.patch | 32 +++++++++++++++
.../xdg-desktop-portal-kde-5.24.5-r1.ebuild | 48 ++++++++++++++++++++++
2 files changed, 80 insertions(+)
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-show-screenshare-notifier-more-prominently.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-show-screenshare-notifier-more-prominently.patch
new file mode 100644
index 000000000000..6b771bfede1e
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.24.5-show-screenshare-notifier-more-prominently.patch
@@ -0,0 +1,32 @@
+From bbff465e6a005c737ee2e53eb5e072da006d9b4b Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Fri, 13 May 2022 16:47:36 +0200
+Subject: [PATCH] screenshare: Show the screen sharing notifier more
+ prominently
+
+Sets it as active, otherwise it got buried in the extended view of the
+system tray.
+
+BUG: 452980
+
+
+(cherry picked from commit 3d61dae1fa334a9f3dadc505a038f75aa5846588)
+---
+ src/waylandintegration.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/waylandintegration.cpp b/src/waylandintegration.cpp
+index e125578..b1b2d4d 100644
+--- a/src/waylandintegration.cpp
++++ b/src/waylandintegration.cpp
+@@ -292,6 +292,7 @@ bool WaylandIntegration::WaylandIntegrationPrivate::startStreaming(Screencasting
+ }
+ item->setOverlayIconByName("media-record");
+ item->setToolTip(item->iconName(), item->title(), i18n("Press to cancel"));
++ item->setStatus(KStatusNotifierItem::Active);
+ connect(item, &KStatusNotifierItem::activateRequested, stream, [=] {
+ stopStreaming(nodeid);
+ stream->deleteLater();
+--
+GitLab
+
diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.24.5-r1.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.24.5-r1.ebuild
new file mode 100644
index 000000000000..302a1ac2c35e
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.24.5-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks"
+
+LICENSE="LGPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+COMMON_DEPEND="
+ >=dev-libs/wayland-1.15
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5[cups]
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kwayland-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/plasma-wayland-protocols-1.1.1
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/xdg-desktop-portal
+"
+BDEPEND=">=dev-qt/qtwaylandscanner-${QTMIN}:5"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-show-screenshare-notifier-more-prominently.patch # KDE-bug 452980
+)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/
@ 2019-05-18 16:35 Andreas Sturmlechner
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2019-05-18 16:35 UTC (permalink / raw
To: gentoo-commits
commit: 1886f66ac346be66b20ecd48c6de914a8de6ec0b
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 18 12:21:11 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 18 16:34:54 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1886f66a
kde-plasma/xdg-desktop-portal-kde: Use QScrollArea for AppChooser
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=407559
Upstream commit 83773f6682154723d2a68e731c0e87c1f1a06893
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../xdg-desktop-portal-kde-5.15.5-appchooser.patch | 73 ++++++++++++++++++++++
.../xdg-desktop-portal-kde-5.15.5-r1.ebuild | 38 +++++++++++
2 files changed, 111 insertions(+)
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch
new file mode 100644
index 00000000000..3a95c0272e8
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch
@@ -0,0 +1,73 @@
+From 83773f6682154723d2a68e731c0e87c1f1a06893 Mon Sep 17 00:00:00 2001
+From: Jan Grulich <jgrulich@redhat.com>
+Date: Thu, 16 May 2019 13:05:19 +0200
+Subject: AppChooser: put list of applications into a scrollarea
+
+BUG:407559
+FIXED-IN: 5.15.6
+---
+ src/appchooserdialog.cpp | 18 ++++++++++++++++--
+ src/appchooserdialogitem.cpp | 1 +
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/appchooserdialog.cpp b/src/appchooserdialog.cpp
+index 8fc888f..b14a5f9 100644
+--- a/src/appchooserdialog.cpp
++++ b/src/appchooserdialog.cpp
+@@ -30,6 +30,7 @@
+ #include <KLocalizedString>
+ #include <QSettings>
+ #include <QStandardPaths>
++#include <QScrollArea>
+ #include <QTimer>
+
+ #include <KProcess>
+@@ -42,6 +43,7 @@ AppChooserDialog::AppChooserDialog(const QStringList &choices, const QString &de
+ , m_defaultApp(defaultApp)
+ {
+ setMinimumWidth(640);
++ setMaximumHeight(480);
+
+ QVBoxLayout *vboxLayout = new QVBoxLayout(this);
+ vboxLayout->setSpacing(20);
+@@ -60,11 +62,23 @@ AppChooserDialog::AppChooserDialog(const QStringList &choices, const QString &de
+
+ vboxLayout->addWidget(label);
+
+- m_gridLayout = new QGridLayout();
++ QWidget *appsWidget = new QWidget(this);
++ QScrollArea *scrollArea = new QScrollArea(this);
++ scrollArea->setFrameShape(QFrame::NoFrame);
++ scrollArea->setWidget(appsWidget);
++ scrollArea->setWidgetResizable(true);
++
++ // FIXME: workaround scrollarea sizing, set minimum height to make sure at least two rows are visible
++ if (choices.count() > 3) {
++ scrollArea->setMinimumHeight(200);
++ }
++
++ m_gridLayout = new QGridLayout;
++ appsWidget->setLayout(m_gridLayout);
+
+ QTimer::singleShot(0, this, &AppChooserDialog::addDialogItems);
+
+- vboxLayout->addLayout(m_gridLayout);
++ vboxLayout->addWidget(scrollArea);
+
+ setLayout(vboxLayout);
+ setWindowTitle(i18n("Open with"));
+diff --git a/src/appchooserdialogitem.cpp b/src/appchooserdialogitem.cpp
+index d01327f..1ce3249 100644
+--- a/src/appchooserdialogitem.cpp
++++ b/src/appchooserdialogitem.cpp
+@@ -36,6 +36,7 @@ AppChooserDialogItem::AppChooserDialogItem(const QString &applicationName, const
+ setIcon(QIcon::fromTheme(icon));
+ setIconSize(QSize(64, 64));
+ setCheckable(true);
++ setFixedHeight(100);
+ setFixedWidth(150);
+ setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+
+--
+cgit v1.1
+
diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild
new file mode 100644
index 00000000000..2bede4d8f54
--- /dev/null
+++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE=""
+
+# TODO: Needed for screencast portal
+# dev-libs/glib:2
+# media-libs/libepoxy
+# media-libs/mesa[gbm]
+# not packaged: PipeWire
+COMMON_DEPEND="
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtprintsupport 'cups')
+ $(add_qt_dep qtwidgets)
+"
+DEPEND="${COMMON_DEPEND}
+ $(add_frameworks_dep kwayland)
+ $(add_qt_dep qtconcurrent)
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/xdg-desktop-portal
+"
+
+PATCHES=( "${FILESDIR}/${P}-appchooser.patch" )
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-03 15:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03 15:29 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-05-22 12:55 Andreas Sturmlechner
2022-05-30 16:09 Andreas Sturmlechner
2022-05-17 19:02 Andreas Sturmlechner
2019-05-18 16:35 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox