Unset focused keyboard surface when screen is locked
If the screen is locked and no lock screen is shown yet we unset the focused keyboard surface on key event. Similar we restore when screen is unlocked. This should hopefully fix the broken lockscreen unit test which hits the special condition as the greeter doesn't show up on build.kde.org.
This commit is contained in:
parent
09cc134bfc
commit
a47b6f9435
1 changed files with 9 additions and 0 deletions
|
@ -983,6 +983,11 @@ void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::Keyboa
|
|||
}
|
||||
return;
|
||||
} while (it != stacking.begin());
|
||||
if (auto seat = findSeat()) {
|
||||
seat->setFocusedKeyboardSurface(nullptr);
|
||||
seat->setTimestamp(time);
|
||||
state == InputRedirection::KeyboardKeyPressed ? seat->keyPressed(key) : seat->keyReleased(key);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1035,6 +1040,10 @@ void InputRedirection::processKeyboardKey(uint32_t key, InputRedirection::Keyboa
|
|||
}
|
||||
}
|
||||
if (auto seat = findSeat()) {
|
||||
if (workspace()->activeClient() &&
|
||||
(seat->focusedKeyboardSurface() != workspace()->activeClient()->surface())) {
|
||||
seat->setFocusedKeyboardSurface(workspace()->activeClient()->surface());
|
||||
}
|
||||
seat->setTimestamp(time);
|
||||
state == InputRedirection::KeyboardKeyPressed ? seat->keyPressed(key) : seat->keyReleased(key);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue