Bind seat hasKeyboard capability to alphanumeric keyboard availability

Summary:
Just because we have a power button, doesn't mean we have a keyboard.
So let's bind the seat keyboard to whether we have a proper keyboard.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1681
This commit is contained in:
Martin Gräßlin 2016-05-25 10:55:07 +02:00
parent 82d2a2f9f1
commit 6f733c3bd0

View file

@ -1126,10 +1126,10 @@ void InputRedirection::setupLibInput()
connect(kwinApp(), &Application::screensCreated, this, &InputRedirection::setupLibInputWithScreens);
}
if (auto s = findSeat()) {
s->setHasKeyboard(conn->hasKeyboard());
s->setHasKeyboard(conn->hasAlphaNumericKeyboard());
s->setHasPointer(conn->hasPointer());
s->setHasTouch(conn->hasTouch());
connect(conn, &LibInput::Connection::hasKeyboardChanged, this,
connect(conn, &LibInput::Connection::hasAlphaNumericKeyboardChanged, this,
[this, s] (bool set) {
if (m_libInput->isSuspended()) {
return;