From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kscreen/files/, kde-plasma/kscreen/
Date: Tue, 18 Apr 2023 17:40:05 +0000 (UTC) [thread overview]
Message-ID: <1681839535.ed9bf039e09be1b1c5838e39589cbe1e53bd5eb8.asturm@gentoo> (raw)
commit: ed9bf039e09be1b1c5838e39589cbe1e53bd5eb8
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 18 17:37:17 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 17:38:55 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed9bf039
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 <AT> gentoo.org>
...nullptrs-if-outputs-changed-during-saving.patch | 39 ++++++++++++++++
kde-plasma/kscreen/kscreen-5.27.4-r2.ebuild | 54 ++++++++++++++++++++++
2 files changed, 93 insertions(+)
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
+)
next reply other threads:[~2023-04-18 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 17:40 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-05 17:30 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kscreen/files/, kde-plasma/kscreen/ Andreas Sturmlechner
2023-09-19 15:27 Andreas Sturmlechner
2023-03-28 20:33 Andreas Sturmlechner
2022-05-30 16:09 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1681839535.ed9bf039e09be1b1c5838e39589cbe1e53bd5eb8.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox