mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
keyboard: Allow canceling the Alt-Tab switcher with Escape
This is a standard feature in most window managers (OpenBox included) that allow window-switching via Alt-Tab.
This commit is contained in:
parent
dddc4f5ed8
commit
b72d524c50
1 changed files with 8 additions and 0 deletions
|
|
@ -119,6 +119,14 @@ handle_compositor_keybindings(struct wl_listener *listener,
|
|||
if (server->cycle_view) {
|
||||
damage_all_outputs(server);
|
||||
if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
||||
for (int i = 0; i < nsyms; i++) {
|
||||
if (syms[i] == XKB_KEY_Escape) {
|
||||
/* cancel */
|
||||
server->cycle_view = NULL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* cycle to next */
|
||||
bool backwards = modifiers & WLR_MODIFIER_SHIFT;
|
||||
/* ignore if this is a modifier key being pressed */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue