commit: eeda50ca2f604306cef854ca4738de4a87306aaf Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed Jun 4 01:21:11 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Jun 4 01:23:00 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eeda50ca
kde-plasma/xdg-desktop-portal-kde: fix crash w/ screencasting Bug: https://bugs.kde.org/show_bug.cgi?id=500577 Closes: https://bugs.gentoo.org/957100 Signed-off-by: Sam James <sam <AT> gentoo.org> ...desktop-portal-kde-6.3.5-screencast-crash.patch | 47 +++++++++++++++ .../xdg-desktop-portal-kde-6.3.5-r1.ebuild | 69 ++++++++++++++++++++++ 2 files changed, 116 insertions(+) diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-6.3.5-screencast-crash.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-6.3.5-screencast-crash.patch new file mode 100644 index 000000000000..34fa7039b157 --- /dev/null +++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-6.3.5-screencast-crash.patch @@ -0,0 +1,47 @@ +https://bugs.gentoo.org/957100 +https://bugs.kde.org/show_bug.cgi?id=500577 +https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/011d08c340bab468eec6aa347ae138e40c6332cf + +From 011d08c340bab468eec6aa347ae138e40c6332cf Mon Sep 17 00:00:00 2001 +From: David Redondo <[email protected]> +Date: Tue, 3 Jun 2025 12:10:34 +0200 +Subject: [PATCH] screencast: Guard against session closing while creating + stream + +Starting a stream runs an event loop during which the session can +be closed. For now use a QPointer to guard against that until +we make it not use an event loop anymore. +BUG:500577 +FIXED-IN:6.4 + + +(cherry picked from commit 13a19d1db5562d45477c6fa2cb53c3f40d7c60ed) + +Co-authored-by: David Redondo <[email protected]> +--- + src/screencast.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/screencast.cpp b/src/screencast.cpp +index d0841a96..510f5242 100644 +--- a/src/screencast.cpp ++++ b/src/screencast.cpp +@@ -282,6 +282,7 @@ + QVariantList outputs; + QList<WindowRestoreInfo> windows; + WaylandIntegration::Streams streams; ++ QPointer<ScreenCastSession> guardedSession(session); + Screencasting::CursorMode cursorMode = Screencasting::CursorMode(session->cursorMode()); + for (const auto &output : std::as_const(selectedOutputs)) { + WaylandIntegration::Stream stream; +@@ -332,6 +333,10 @@ + return 2; + } + ++ if (!guardedSession) { ++ return 2; ++ } ++ + session->setStreams(streams); + results.insert(QStringLiteral("streams"), QVariant::fromValue<WaylandIntegration::Streams>(streams)); + if (allowRestore) { diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-6.3.5-r1.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-6.3.5-r1.ebuild new file mode 100644 index 000000000000..545789898821 --- /dev/null +++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-6.3.5-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=6.10.0 +QTMIN=6.8.1 +inherit ecm plasma.kde.org xdg + +DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks" + +LICENSE="LGPL-2+" +SLOT="6" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="" + +# dev-qt/qtbase:= slot op: Uses Qt::GuiPrivate for qtx11extras_p.h +# dev-qt/qtbase:=[cups]: includes specifically the cups private header +# dev-qt/qtgui: QtXkbCommonSupport is provided by either IUSE libinput or X +COMMON_DEPEND=" + >=dev-libs/wayland-1.15 + >=dev-qt/qtbase-${QTMIN}:6=[cups,dbus,gui,widgets] + >=dev-qt/qtdeclarative-${QTMIN}:6 + || ( + >=dev-qt/qtbase-${QTMIN}:6[libinput] + >=dev-qt/qtbase-${QTMIN}:6[X] + ) + >=dev-qt/qtwayland-${QTMIN}:6 + >=kde-frameworks/kcoreaddons-${KFMIN}:6[dbus] + >=kde-frameworks/kconfig-${KFMIN}:6 + >=kde-frameworks/kcrash-${KFMIN}:6 + >=kde-frameworks/kglobalaccel-${KFMIN}:6 + >=kde-frameworks/kguiaddons-${KFMIN}:6 + >=kde-frameworks/ki18n-${KFMIN}:6 + >=kde-frameworks/kiconthemes-${KFMIN}:6 + >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/kirigami-${KFMIN}:6 + >=kde-frameworks/knotifications-${KFMIN}:6 + >=kde-frameworks/kservice-${KFMIN}:6 + >=kde-frameworks/kstatusnotifieritem-${KFMIN}:6 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 + >=kde-frameworks/kwindowsystem-${KFMIN}:6 + >=kde-plasma/kwayland-${KDE_CATV}:6 + >=kde-plasma/plasma-workspace-${KDE_CATV}:6 + x11-libs/libxkbcommon +" +DEPEND="${COMMON_DEPEND} + >=dev-libs/plasma-wayland-protocols-1.16.0 + >=dev-libs/wayland-protocols-1.25 + >=dev-qt/qtbase-${QTMIN}:6[concurrent] +" +RDEPEND="${COMMON_DEPEND} + kde-misc/kio-fuse:6 + sys-apps/xdg-desktop-portal +" +BDEPEND=" + >=dev-qt/qtwayland-${QTMIN}:6 + virtual/pkgconfig +" + +CMAKE_SKIP_TESTS=( + # bugs: 926483, wants dbus/X11 + colorschemetest +) + +PATCHES=( + "${FILESDIR}"/${PN}-6.3.5-screencast-crash.patch +)
