From 74724065ae05a3b567474424c22fdb6d344a01cc Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 2 Jun 2021 16:38:36 +0200 Subject: [PATCH] inputmethod: Don't disable them by default if there's a connected keyboard If the user has chosen to have a virtual keyboard (i.e. prefered maliit over none in the KCM) they should get it. If it's too annoying it should either be disabled or we can fix it so it gets less in the way. This is especially important since some hardware registers itself as a keyboard even if it's not a fully functional keyboard. --- src/inputmethod.cpp | 11 ----------- src/inputmethod.h | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 2c61ea0820..c22007bcad 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -70,17 +70,6 @@ void InputMethod::init() }); connect(ScreenLockerWatcher::self(), &ScreenLockerWatcher::aboutToLock, this, &InputMethod::hide); - if (waylandServer()) { - m_enabled = !input()->hasAlphaNumericKeyboard(); - qCDebug(KWIN_VIRTUALKEYBOARD) << "enabled by default: " << m_enabled; - connect(input(), &InputRedirection::hasAlphaNumericKeyboardChanged, this, - [this] (bool set) { - qCDebug(KWIN_VIRTUALKEYBOARD) << "AlphaNumeric Keyboard changed:" << set << "toggling virtual keyboard."; - setEnabled(!set); - } - ); - } - updateSni(); connect(this, &InputMethod::enabledChanged, this, &InputMethod::updateSni); diff --git a/src/inputmethod.h b/src/inputmethod.h index 6a57219aaf..45a94317ed 100644 --- a/src/inputmethod.h +++ b/src/inputmethod.h @@ -88,7 +88,7 @@ private: quint32 end = 0; } preedit; - bool m_enabled = false; + bool m_enabled = true; quint32 m_serial = 0; QScopedPointer m_sni; QPointer m_inputClient;