mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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@gentoo.org>
This commit is contained in:
@@ -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 <kde@david-redondo.de>
|
||||
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 <kde@david-redondo.de>
|
||||
---
|
||||
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) {
|
||||
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user