From 29f387bb57712143b60f457a3a93a7b98a92e500 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Wed, 3 Jul 2024 11:58:50 -0400 Subject: [PATCH] shellsettingsplugin: Never affect panels when not in Plasma Mobile If the navigation bar setting is triggered, it can affect the Desktop session as well. Add a check to only change Plasma panels in Plasma Mobile. --- components/shellsettingsplugin/mobileshellsettings.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/shellsettingsplugin/mobileshellsettings.cpp b/components/shellsettingsplugin/mobileshellsettings.cpp index 508426f4..ed3fa567 100644 --- a/components/shellsettingsplugin/mobileshellsettings.cpp +++ b/components/shellsettingsplugin/mobileshellsettings.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -168,6 +169,12 @@ void MobileShellSettings::setConvergenceModeEnabled(bool enabled) void MobileShellSettings::updateNavigationBarsInPlasma(bool navigationPanelEnabled) { + // Do not update panels when not in Plasma Mobile + bool isMobilePlatform = KRuntimePlatform::runtimePlatform().contains("phone"); + if (!isMobilePlatform) { + return; + } + auto message = QDBusMessage::createMethodCall(QLatin1String("org.kde.plasmashell"), QLatin1String("/PlasmaShell"), QLatin1String("org.kde.PlasmaShell"),