mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
respect user's choice of convergence mode
When plasmashell is started and the user had set docked mode, it may get reset. This patch makes sure that we don't change the user's choice after hotplugging/unplugging a display. The initial setting of convergendeMode (if true) is now remembered. Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
04e862fff0
commit
ae4bf8be60
1 changed files with 14 additions and 3 deletions
|
|
@ -15,12 +15,23 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|||
QtObject {
|
||||
id: component
|
||||
|
||||
property bool initialConvergenceMode: false
|
||||
|
||||
property var apiListener: Connections {
|
||||
target: KScreenOSDUtil
|
||||
function onOutputsChanged() {
|
||||
console.log("KScreenOSDProvider convergenceModeEnabled: "
|
||||
+ (KScreenOSDUtil.outputs > 1 ? "true" : "false"));
|
||||
ShellSettings.Settings.convergenceModeEnabled = KScreenOSDUtil.outputs > 1;
|
||||
if (KScreenOSDUtil.outputs > 1) {
|
||||
initialConvergenceMode = ShellSettings.Settings.convergenceModeEnabled;
|
||||
}
|
||||
- console.log("KScreenOSDProvider convergenceModeEnabled: "
|
||||
- + (KScreenOSDUtil.outputs > 1 ? "true" : (initialConvergenceMode ? "TRUE" : "FALSE")));
|
||||
ShellSettings.Settings.convergenceModeEnabled = KScreenOSDUtil.outputs > 1 ? true : initialConvergenceMode;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (KScreenOSDUtil.outputs < 2) {
|
||||
initialConvergenceMode = ShellSettings.Settings.convergenceModeEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue