From 4b5571163e20591a1a90ae08d62194d4235d77eb Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 7 Jul 2021 02:42:06 +0200 Subject: [PATCH] inputmethod: save enabled state --- src/inputmethod.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index d1bb285aa2..7ee5f84176 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -50,6 +50,7 @@ KWIN_SINGLETON_FACTORY(InputMethod) InputMethod::InputMethod(QObject *parent) : QObject(parent) { + m_enabled = kwinApp()->config()->group("Wayland").readEntry("VirtualKeyboardEnabled", true); // this is actually too late. Other processes are started before init, // so might miss the availability of text input // but without Workspace we don't have the window listed at all @@ -320,6 +321,9 @@ void InputMethod::setEnabled(bool enabled) } else { startInputMethod(); } + // save value into config + kwinApp()->config()->group("Wayland").writeEntry("VirtualKeyboardEnabled", m_enabled); + kwinApp()->config()->sync(); } static quint32 keysymToKeycode(quint32 sym)