mirror of
https://github.com/labwc/labwc.git
synced 2026-03-19 05:33:53 -04:00
keyboard: allow switching VT when locked
This commit is contained in:
parent
00ce7a2b5e
commit
0acdf041b8
1 changed files with 14 additions and 14 deletions
|
|
@ -257,20 +257,6 @@ 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);
|
|
||||||
|
|
||||||
/* Catch C-A-F1 to C-A-F12 to change tty */
|
/* Catch C-A-F1 to C-A-F12 to change tty */
|
||||||
if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) {
|
||||||
for (int i = 0; i < translated.nr_syms; i++) {
|
for (int i = 0; i < translated.nr_syms; i++) {
|
||||||
|
|
@ -287,6 +273,20 @@ handle_compositor_keybindings(struct keyboard *keyboard,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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);
|
||||||
|
|
||||||
if (server->input_mode == LAB_INPUT_STATE_MENU) {
|
if (server->input_mode == LAB_INPUT_STATE_MENU) {
|
||||||
/*
|
/*
|
||||||
* Usually, release events are already caught via _press_event_was_bound().
|
* Usually, release events are already caught via _press_event_was_bound().
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue