Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

virtual_keyboard: Emulate key release events on destroy#2918

Merged
emersion merged 1 commit intoswaywm:masterfrom
yuja:virtual-release-on-destroy
May 7, 2021
Merged

virtual_keyboard: Emulate key release events on destroy#2918
emersion merged 1 commit intoswaywm:masterfrom
yuja:virtual-release-on-destroy

Conversation

@yuja
Copy link
Copy Markdown
Contributor

@yuja yuja commented May 7, 2021

According to libinput, release events are generated when device is unplugged,
and libinput copies this behavior for device removal. Let's do the same for
our virtual keyboard.

https://github.com/wayland-project/libinput/commit/8f846a41fa0566fbd72ece676656e20e56ce43e6

This is another attempt to fix #2034 and the following sway issue:

swaywm/sway#6254

Note that we have other key repeating issues in sway, which aren't addressed
by this patch. Since the virtual keyboard itself isn't destroyed when the
keyboard grab is destroyed, we'll probably need some trick to reset the state
of the corresponding virtual keyboard when the grab is released.

swaywm/sway#6095
swaywm/sway#6193

According to libinput, release events are generated when device is unplugged,
and libinput copies this behavior for device removal. Let's do the same for
our virtual keyboard.

https://github.com/wayland-project/libinput/commit/8f846a41fa0566fbd72ece676656e20e56ce43e6

This is another attempt to fix swaywm#2034 and the following sway issue:

swaywm/sway#6254

Note that we have other key repeating issues in sway, which aren't addressed
by this patch. Since the virtual keyboard itself isn't destroyed when the
keyboard grab is destroyed, we'll probably need some trick to reset the state
of the corresponding virtual keyboard when the grab is released.

swaywm/sway#6095
swaywm/sway#6193
Copy link
Copy Markdown
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@emersion emersion merged commit 8008d21 into swaywm:master May 7, 2021
@yuja yuja deleted the virtual-release-on-destroy branch May 7, 2021 09:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

virtual-keyboard: release unreleased keys

2 participants