mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 10:57:07 -08:00
kde-plasma/plasma-workspace: Fix plasma-apply-lookandfeel
See also: https://mail.kde.org/pipermail/plasma-devel/2026-June/124012.html Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
+83
@@ -0,0 +1,83 @@
|
||||
From 90d0027e05e4a8c198fd046687eb54718233b2e7 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
Date: Mon, 15 Jun 2026 15:39:09 +0000
|
||||
Subject: [PATCH] plasma-apply-lookandfeel: Optionally blend changes when
|
||||
changing color scheme
|
||||
|
||||
Makes it consistent with merely changing color schemes.
|
||||
|
||||
|
||||
(cherry picked from commit 7e7f2a6cb408a6c38b55ecdde27d4c42e1cb06da)
|
||||
|
||||
Co-authored-by: Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
---
|
||||
kcms/lookandfeel/kcm.cpp | 2 +-
|
||||
kcms/lookandfeel/tool/lnftool.cpp | 2 +-
|
||||
libklookandfeel/klookandfeelmanager.cpp | 11 +++++++++++
|
||||
libklookandfeel/klookandfeelmanager.h | 2 ++
|
||||
4 files changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/kcms/lookandfeel/kcm.cpp b/kcms/lookandfeel/kcm.cpp
|
||||
index ef6d80f87e..029bfbdc11 100644
|
||||
--- a/kcms/lookandfeel/kcm.cpp
|
||||
+++ b/kcms/lookandfeel/kcm.cpp
|
||||
@@ -467,7 +467,7 @@ void KCMLookandFeel::apply()
|
||||
save();
|
||||
|
||||
if (!settings()->automaticLookAndFeel()) {
|
||||
- m_lnf->save(package, m_selectedContents);
|
||||
+ m_lnf->save(package, m_selectedContents | KLookAndFeelManager::BlendChanges);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/kcms/lookandfeel/tool/lnftool.cpp b/kcms/lookandfeel/tool/lnftool.cpp
|
||||
index 1675d1b87d..669466b21d 100644
|
||||
--- a/kcms/lookandfeel/tool/lnftool.cpp
|
||||
+++ b/kcms/lookandfeel/tool/lnftool.cpp
|
||||
@@ -96,7 +96,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
// By default do not modify the layout, unless explicitly specified
|
||||
- KLookAndFeelManager::Contents selection = KLookAndFeelManager::AppearanceSettings;
|
||||
+ KLookAndFeelManager::Contents selection = KLookAndFeelManager::AppearanceSettings | KLookAndFeelManager::BlendChanges;
|
||||
if (parser.isSet(_resetLayout)) {
|
||||
selection |= KLookAndFeelManager::LayoutSettings;
|
||||
}
|
||||
diff --git a/libklookandfeel/klookandfeelmanager.cpp b/libklookandfeel/klookandfeelmanager.cpp
|
||||
index 83593dfd3b..30b00e7a5e 100644
|
||||
--- a/libklookandfeel/klookandfeelmanager.cpp
|
||||
+++ b/libklookandfeel/klookandfeelmanager.cpp
|
||||
@@ -484,6 +484,17 @@ void KLookAndFeelManager::save(const KPackage::Package &package, Contents applyM
|
||||
const QString packageId = package.metadata().pluginId();
|
||||
const Contents itemsToApply = packageContents(package) & applyMask;
|
||||
|
||||
+ if (itemsToApply.testFlag(Colors) && applyMask.testFlag(BlendChanges) && m_mode == Mode::Apply) {
|
||||
+ auto msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KWin"),
|
||||
+ QStringLiteral("/org/kde/KWin/BlendChanges"),
|
||||
+ QStringLiteral("org.kde.KWin.BlendChanges"),
|
||||
+ QStringLiteral("start"));
|
||||
+ msg << 800;
|
||||
+ // This is deliberately blocking so that we ensure Kwin has processed the
|
||||
+ // animation start event before we potentially trigger client side changes
|
||||
+ QDBusConnection::sessionBus().call(msg);
|
||||
+ }
|
||||
+
|
||||
if (itemsToApply.testFlag(DesktopLayout) && m_mode == Mode::Apply) {
|
||||
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.plasmashell"),
|
||||
QStringLiteral("/PlasmaShell"),
|
||||
diff --git a/libklookandfeel/klookandfeelmanager.h b/libklookandfeel/klookandfeelmanager.h
|
||||
index 7cc51b8239..2f4b3483c9 100644
|
||||
--- a/libklookandfeel/klookandfeelmanager.h
|
||||
+++ b/libklookandfeel/klookandfeelmanager.h
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
// General Flag combinations
|
||||
KWinSettings = WindowSwitcher | WindowDecoration | WindowPlacement | TitlebarLayout | BorderSize,
|
||||
AllSettings = (1 << 26) - 1,
|
||||
+ // Animate settings change (this blocks for 300ms during the animation!)
|
||||
+ BlendChanges = (1 << 30),
|
||||
};
|
||||
Q_DECLARE_FLAGS(Contents, ContentFlags)
|
||||
Q_FLAG(Contents)
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -163,6 +163,7 @@ PDEPEND="
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.22.5-krunner-cwd-at-home.patch" # TODO upstream: KDE-bug 432975, bug 767478
|
||||
"${FILESDIR}/${P}-fix-plasma-apply-lookandfeel.patch" # in 6.7.1
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
|
||||
Reference in New Issue
Block a user