Commit 6fe7f928 authored by Tobias Fella's avatar Tobias Fella Committed by Nicolas Fella

Make the virtual keyboard disappear when locking the screen

Summary: Previously, the virtual keyboard did not close when locking the screen, instead blocking part of the lockscreen while not actually working. This patch actually makes the keyboard close before locking

Test Plan: Open virtual keyboard -> Lock Screen -> No keyboard shown

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27172
parent 3f7fa8e4
......@@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
#include "xkb.h"
#include "xdgshellclient.h"
#include "screenlockerwatcher.h"
#include <KWayland/Server/display.h>
#include <KWayland/Server/seat_interface.h>
......@@ -87,6 +88,8 @@ void VirtualKeyboard::init()
}
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 @@ void VirtualKeyboard::hide()
if (m_inputWindow.isNull()) {
return;
}
m_inputWindow->hide();
qApp->inputMethod()->hide();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment