Skip to content

tabbox: Do not wrap around the window list when the shortcut is held

Ismael Asensio requested to merge work/iasensio/tabbox-keyheld-wrap into master

When the tabbox shortcut (ex. Alt-Tab) is held pressed, due to the autorepeat keys mechanism, we'll receive a lot of rapid key events and quickly iterate through the window list, potentially wrapping around in an infinite loop.

Instead, let's detect if the key event is in autorepeat and stop the rapid iteration at the bounds of the window list.

Wrapping around is still possible by releasing and pressing the non-modifier key (generally Tab) again.

Wayland-only for now due to the difficulty of detecting a held key from a xcb_key_press_event.

BEFORE AFTER
tabbox_wrap_before tabbox_wrap_after

This is built on top of the refactor in MR !6852 (merged)

FEATURE: 454474
FIXED-IN: 6.3.0

Edited by Ismael Asensio

Merge request reports

Loading