summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-04-18 19:37:17 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2023-04-18 19:38:55 +0200
commited9bf039e09be1b1c5838e39589cbe1e53bd5eb8 (patch)
treeb3ee3f2d768d5406cbeef56de55a4b187f755bc2 /kde-plasma/kscreen
parentdev-libs/ktextaddons: drop 1.1.1-r1 (diff)
downloadgentoo-ed9bf039e09be1b1c5838e39589cbe1e53bd5eb8.tar.gz
gentoo-ed9bf039e09be1b1c5838e39589cbe1e53bd5eb8.tar.bz2
gentoo-ed9bf039e09be1b1c5838e39589cbe1e53bd5eb8.zip
kde-plasma/kscreen: don't stumble over nullptrs if outputs changed
...during saving KDE-bug: https://bugs.kde.org/show_bug.cgi?id=466960 Bug: https://bugs.gentoo.org/899706 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/kscreen')
-rw-r--r--kde-plasma/kscreen/files/kscreen-5.27.4-avoid-nullptrs-if-outputs-changed-during-saving.patch39
-rw-r--r--kde-plasma/kscreen/kscreen-5.27.4-r2.ebuild54
2 files changed, 93 insertions, 0 deletions
diff --git a/kde-plasma/kscreen/files/kscreen-5.27.4-avoid-nullptrs-if-outputs-changed-during-saving.patch b/kde-plasma/kscreen/files/kscreen-5.27.4-avoid-nullptrs-if-outputs-changed-during-saving.patch
new file mode 100644
index 000000000000..795773a679f6
--- /dev/null
+++ b/kde-plasma/kscreen/files/kscreen-5.27.4-avoid-nullptrs-if-outputs-changed-during-saving.patch
@@ -0,0 +1,39 @@
+From 8af1cfac332f6f7c4e6db40c851dd5ac719236f1 Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter@kde.org>
+Date: Mon, 17 Apr 2023 16:01:50 +0200
+Subject: [PATCH] don't stumble over nullptrs if outputs changed during saving
+
+exec() opens a nested eventloop that does event processing and may end
+up processing output changes when e.g. a screen is getting unplugged. as
+part of this our m_configHandler may get reset to null, so make sure the
+pointers are still valid after exec
+
+BUG: 466960
+
+
+(cherry picked from commit 0bfa16bd2b59ac9b2ce8112c06d86e5e29c69654)
+---
+ kcm/kcm.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
+index f292699c..931509eb 100644
+--- a/kcm/kcm.cpp
++++ b/kcm/kcm.cpp
+@@ -172,6 +172,13 @@ void KCMKScreen::doSave()
+ m_stopUpdatesFromBackend = true;
+ op->exec();
+
++ // exec() opens a nested eventloop that may have unset m_configHandler if (e.g.)
++ // outputs changed during saving. https://bugs.kde.org/show_bug.cgi?id=466960
++ if (!m_configHandler || !m_configHandler->config()) {
++ Q_EMIT errorOnSave();
++ return;
++ }
++
+ const auto updateInitialData = [this]() {
+ if (!m_configHandler || !m_configHandler->config()) {
+ return;
+--
+GitLab
+
diff --git a/kde-plasma/kscreen/kscreen-5.27.4-r2.ebuild b/kde-plasma/kscreen/kscreen-5.27.4-r2.ebuild
new file mode 100644
index 000000000000..b462d1c4519b
--- /dev/null
+++ b/kde-plasma/kscreen/kscreen-5.27.4-r2.ebuild
@@ -0,0 +1,54 @@
+# 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="KDE Plasma screen management"
+HOMEPAGE="https://invent.kde.org/plasma/kscreen"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE=""
+
+# bug #580440, last checked 5.6.3
+RESTRICT="test"
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtsensors-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ >=kde-plasma/layer-shell-qt-${PVCUT}:5
+ >=kde-plasma/libkscreen-${PVCUT}:5
+ x11-libs/libX11
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5
+ >=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:5"
+
+PATCHES=(
+ "${FILESDIR}/${P}-kcm-notify-changes-when-global-scale-changes.patch" # KDE-bug 468203
+ "${FILESDIR}/${P}-avoid-nullptrs-if-outputs-changed-during-saving.patch" # KDE-bug 466960
+)