Skip to content

tabbox: Reset keyboard focus when grabbing input

Vlad Zahorodnii requested to merge work/zzag/tabbox-reset-keyboard-focus into master

When the tabbox grabs input, the key events won't be sent to the client. It's not good for a couple of reasons: first, it can fool the client into repeating a previously pressed key; and the server side and the client side can be out of sync after the task switcher is dismissed.

In order to handle that properly, this change makes the tabbox reset the keyboard focus when it's shown or hidden. When the task switcher is dismissed, an enter event will be sent with the current state of the pressed keys.

Ideally, the same needs to be done with the pointer focus but it's challenging to achieve with the current input pipeline design. An input grab abstraction is needed to handle pointer focus when the task switcher is active.

Merge request reports