mirror of
https://github.com/labwc/labwc.git
synced 2026-03-29 07:58:10 -04:00
keyboard: fix release event bug after session lock
Do not withhold the release event associated with a keybind which executes a keyboard-input-inhibiting client like swaylock. In other words, make release-events of absorbed keys (those used up by a keybind) de-register as such even though session-lock or input-inhibit is in-force. Fixes: issue #1114 Helped-by: @Consolatis
This commit is contained in:
parent
e5aef03319
commit
d56cf92794
1 changed files with 12 additions and 12 deletions
|
|
@ -232,18 +232,6 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
event->state == WL_KEYBOARD_KEY_STATE_PRESSED);
|
event->state == WL_KEYBOARD_KEY_STATE_PRESSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Ignore labwc keybindings if input is inhibited
|
|
||||||
* It's important to do this after key_state_set_pressed() to ensure
|
|
||||||
* _all_ key press/releases are registered
|
|
||||||
*/
|
|
||||||
if (seat->active_client_while_inhibited) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (seat->server->session_lock) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a user lets go of the modifier (e.g. alt) before the 'normal' key
|
* If a user lets go of the modifier (e.g. alt) before the 'normal' key
|
||||||
* (e.g. tab) when window-cycling, we do not end the cycling until both
|
* (e.g. tab) when window-cycling, we do not end the cycling until both
|
||||||
|
|
@ -269,6 +257,18 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ignore labwc keybindings if input is inhibited
|
||||||
|
* It's important to do this after key_state_set_pressed() to ensure
|
||||||
|
* _all_ key press/releases are registered
|
||||||
|
*/
|
||||||
|
if (seat->active_client_while_inhibited) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (seat->server->session_lock) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t modifiers = wlr_keyboard_get_modifiers(wlr_keyboard);
|
uint32_t modifiers = wlr_keyboard_get_modifiers(wlr_keyboard);
|
||||||
|
|
||||||
/* Catch C-A-F1 to C-A-F12 to change tty */
|
/* Catch C-A-F1 to C-A-F12 to change tty */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue