mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
kde-plasma/kscreen: kcm: reload kwin config
... on tearing option change Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
From 755b84e51b71c33e0099cc42d3df12c05b6beb03 Mon Sep 17 00:00:00 2001
|
||||
From: Xaver Hugl <xaver.hugl@gmail.com>
|
||||
Date: Fri, 23 May 2025 16:55:04 +0200
|
||||
Subject: [PATCH] kcm: reload kwin config when tearing option is changed
|
||||
|
||||
Ideally, we'd integrate it into the normal output configuration protocol, but for
|
||||
backporting that's not a usable approach
|
||||
|
||||
BUG: 504634
|
||||
BUG: 496970
|
||||
|
||||
|
||||
(cherry picked from commit ca3a700f167232408666e68f648c8eb028cad7d5)
|
||||
|
||||
Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
|
||||
---
|
||||
kcm/kcm.cpp | 10 ++++++++++
|
||||
kcm/kcm.h | 1 +
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
|
||||
index cc9d1cf89..a0a0f4b68 100644
|
||||
--- a/kcm/kcm.cpp
|
||||
+++ b/kcm/kcm.cpp
|
||||
@@ -226,6 +226,12 @@ void KCMKScreen::doSave()
|
||||
// enough time to change configuration.
|
||||
QTimer::singleShot(1000, this, updateInitialData);
|
||||
}
|
||||
+
|
||||
+ if (m_needsKwinConfigReload) {
|
||||
+ m_needsKwinConfigReload = false;
|
||||
+ QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||
+ QDBusConnection::sessionBus().send(message);
|
||||
+ }
|
||||
}
|
||||
|
||||
bool KCMKScreen::backendReady() const
|
||||
@@ -523,6 +529,10 @@ bool KCMKScreen::xwaylandClientsScaleSupported() const
|
||||
|
||||
void KCMKScreen::setAllowTearing(bool allow)
|
||||
{
|
||||
+ if (KWinCompositingSetting::self()->allowTearing() == allow) {
|
||||
+ return;
|
||||
+ }
|
||||
+ m_needsKwinConfigReload = true;
|
||||
KWinCompositingSetting::self()->setAllowTearing(allow);
|
||||
Q_EMIT changed();
|
||||
}
|
||||
diff --git a/kcm/kcm.h b/kcm/kcm.h
|
||||
index c0046bb17..a124ca51e 100644
|
||||
--- a/kcm/kcm.h
|
||||
+++ b/kcm/kcm.h
|
||||
@@ -135,6 +135,7 @@ private:
|
||||
bool m_settingsReverted = false;
|
||||
bool m_stopUpdatesFromBackend = false;
|
||||
bool m_configNeedsSave = false;
|
||||
+ bool m_needsKwinConfigReload = false;
|
||||
|
||||
QSortFilterProxyModel *m_outputProxyModel;
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
58
kde-plasma/kscreen/kscreen-6.3.5-r1.ebuild
Normal file
58
kde-plasma/kscreen/kscreen-6.3.5-r1.ebuild
Normal file
@@ -0,0 +1,58 @@
|
||||
# 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="KDE Plasma screen management"
|
||||
HOMEPAGE="https://invent.kde.org/plasma/kscreen"
|
||||
|
||||
LICENSE="GPL-2" # TODO: CHECK
|
||||
SLOT="6"
|
||||
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
|
||||
IUSE="X"
|
||||
|
||||
# bug #580440, last checked 5.6.3
|
||||
RESTRICT="test"
|
||||
|
||||
# qtbase slot op: GuiPrivate use in kded daemon
|
||||
DEPEND="
|
||||
>=dev-qt/qtbase-${QTMIN}:6[dbus,gui,widgets]
|
||||
>=dev-qt/qtdeclarative-${QTMIN}:6[widgets]
|
||||
>=dev-qt/qtsensors-${QTMIN}:6
|
||||
>=kde-frameworks/kcmutils-${KFMIN}:6
|
||||
>=kde-frameworks/kconfig-${KFMIN}:6
|
||||
>=kde-frameworks/kcoreaddons-${KFMIN}:6
|
||||
>=kde-frameworks/kdbusaddons-${KFMIN}:6
|
||||
>=kde-frameworks/kglobalaccel-${KFMIN}:6
|
||||
>=kde-frameworks/ki18n-${KFMIN}:6
|
||||
>=kde-frameworks/ksvg-${KFMIN}:6
|
||||
>=kde-frameworks/kwindowsystem-${KFMIN}:6
|
||||
>=kde-frameworks/kxmlgui-${KFMIN}:6
|
||||
>=kde-plasma/layer-shell-qt-${KDE_CATV}:6
|
||||
>=kde-plasma/libkscreen-${KDE_CATV}:6=
|
||||
>=kde-plasma/libplasma-${KDE_CATV}:6
|
||||
X? (
|
||||
>=dev-qt/qtbase-${QTMIN}:6=[X]
|
||||
x11-libs/libX11
|
||||
x11-libs/libxcb:=
|
||||
x11-libs/libXi
|
||||
)
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-qt/qt5compat-${QTMIN}:6[qml]
|
||||
"
|
||||
BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:6"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-kcm-reload-kwin-cfg.patch" ) # KDE-bug 504634
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_X11=$(usex X)
|
||||
)
|
||||
ecm_src_configure
|
||||
}
|
||||
Reference in New Issue
Block a user