Commit 96baf93f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Update pressed keys even if there is no focused surface

This is a minor regression introduced with the refactor of the
KeyboardInterface. We need to update pressed key status even if there is
no focused surface, otherwise some keys may get stuck in the pressed
state.
parent 21ab5652
Pipeline #54332 passed with stage
in 7 minutes and 13 seconds
......@@ -179,11 +179,11 @@ QVector<quint32> KeyboardInterfacePrivate::pressedKeys() const
void KeyboardInterface::keyPressed(quint32 key)
{
if (!d->focusedSurface) {
if (!d->updateKey(key, KeyboardInterfacePrivate::State::Pressed)) {
return;
}
if (!d->updateKey(key, KeyboardInterfacePrivate::State::Pressed)) {
if (!d->focusedSurface) {
return;
}
......@@ -196,11 +196,11 @@ void KeyboardInterface::keyPressed(quint32 key)
void KeyboardInterface::keyReleased(quint32 key)
{
if (!d->focusedSurface) {
if (!d->updateKey(key, KeyboardInterfacePrivate::State::Released)) {
return;
}
if (!d->updateKey(key, KeyboardInterfacePrivate::State::Released)) {
if (!d->focusedSurface) {
return;
}
......
Supports Markdown
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