mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
envmanager: disable session restore for mobile
session restore could lead to soft lock since dialer can open on top of the login screen.
This commit is contained in:
parent
569ad19f38
commit
d7ae1917af
3 changed files with 12 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
||||
// SPDX-FileCopyrightText: 2024 Luis Büchi <luis.buechi@kdemail.net>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
|
@ -70,3 +71,6 @@ QMap<QString, QMap<QString, QVariant>> getKwinrcSettings(KSharedConfig::Ptr m_mo
|
|||
// Make sure that the effect/script is added to the kwinrc "Plugins" section above!
|
||||
const QList<QString> KWIN_EFFECTS = {"blur", "mobiletaskswitcher", "screenedge"};
|
||||
const QList<QString> KWIN_SCRIPTS = {"convergentwindows"};
|
||||
|
||||
//ksmserver
|
||||
const QMap<QString, QMap<QString, QVariant>> KSMSERVER_SETTINGS = {{"General", {{"loginMode", "emptySession"}}}};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
||||
// SPDX-FileCopyrightText: 2024 Luis Büchi <luis.buechi@kdemail.net>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "settings.h"
|
||||
|
|
@ -24,6 +25,7 @@ Settings::Settings(QObject *parent)
|
|||
, m_kwinrcConfig{KSharedConfig::openConfig(u"kwinrc"_s, KConfig::SimpleConfig)}
|
||||
, m_appBlacklistConfig{KSharedConfig::openConfig(u"applications-blacklistrc"_s, KConfig::SimpleConfig)}
|
||||
, m_kdeglobalsConfig{KSharedConfig::openConfig(u"kdeglobals"_s, KConfig::SimpleConfig)}
|
||||
, m_ksmServerConfig{KSharedConfig::openConfig(u"ksmserverrc"_s, KConfig::SimpleConfig)}
|
||||
, m_configWatcher{KConfigWatcher::create(m_mobileConfig)}
|
||||
{
|
||||
}
|
||||
|
|
@ -87,6 +89,10 @@ void Settings::applyMobileConfiguration()
|
|||
writeKeys(u"kdeglobals"_s, m_kdeglobalsConfig, KDEGLOBALS_SETTINGS, false);
|
||||
m_kdeglobalsConfig->sync();
|
||||
|
||||
// ksmserver
|
||||
writeKeys(u"ksmserverrc"_s, m_ksmServerConfig, KSMSERVER_SETTINGS, false);
|
||||
m_ksmServerConfig->sync();
|
||||
|
||||
// save our changes
|
||||
m_mobileConfig->sync();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
||||
// SPDX-FileCopyrightText: 2024 Luis Büchi <luis.buechi@kdemail.net>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
|
@ -41,6 +42,7 @@ private:
|
|||
KSharedConfig::Ptr m_kwinrcConfig;
|
||||
KSharedConfig::Ptr m_appBlacklistConfig;
|
||||
KSharedConfig::Ptr m_kdeglobalsConfig;
|
||||
KSharedConfig::Ptr m_ksmServerConfig;
|
||||
|
||||
KConfigWatcher::Ptr m_configWatcher;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue