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
This commit is contained in:
parent
3f7fa8e47b
commit
6fe7f9281a
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue