mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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.
This commit is contained in:
parent
a58144fb18
commit
29f387bb57
1 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <KIO/CommandLauncherJob>
|
||||
#include <KNotificationJobUiDelegate>
|
||||
#include <KPluginFactory>
|
||||
#include <KRuntimePlatform>
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue