diff --git a/virtualkeyboard.cpp b/virtualkeyboard.cpp --- a/virtualkeyboard.cpp +++ b/virtualkeyboard.cpp @@ -27,6 +27,7 @@ #include "workspace.h" #include "xkb.h" #include "xdgshellclient.h" +#include "screenlockerwatcher.h" #include #include @@ -87,6 +88,8 @@ } m_inputWindow->setProperty("__kwin_input_method", true); + connect(ScreenLockerWatcher::self(), &ScreenLockerWatcher::aboutToLock, this, &VirtualKeyboard::hide); + if (waylandServer()) { m_enabled = !input()->hasAlphaNumericKeyboard(); qCDebug(KWIN_VIRTUALKEYBOARD) << "enabled by default: " << m_enabled; @@ -289,6 +292,7 @@ if (m_inputWindow.isNull()) { return; } + m_inputWindow->hide(); qApp->inputMethod()->hide(); }