diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/input/keyboard.c | 14 | ||||
-rw-r--r-- | sway/input/switch.c | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 577ec9f5..dea7a7bd 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -405,7 +405,7 @@ static void handle_key_event(struct sway_keyboard *keyboard, | |||
405 | char *device_identifier = input_device_get_identifier(wlr_device); | 405 | char *device_identifier = input_device_get_identifier(wlr_device); |
406 | bool exact_identifier = keyboard->wlr->group != NULL; | 406 | bool exact_identifier = keyboard->wlr->group != NULL; |
407 | seat_idle_notify_activity(seat, IDLE_SOURCE_KEYBOARD); | 407 | seat_idle_notify_activity(seat, IDLE_SOURCE_KEYBOARD); |
408 | bool input_inhibited = server.session_lock.locked; | 408 | bool locked = server.session_lock.locked; |
409 | struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = | 409 | struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = |
410 | keyboard_shortcuts_inhibitor_get_for_focused_surface(seat); | 410 | keyboard_shortcuts_inhibitor_get_for_focused_surface(seat); |
411 | bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active; | 411 | bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active; |
@@ -423,17 +423,17 @@ static void handle_key_event(struct sway_keyboard *keyboard, | |||
423 | struct sway_binding *binding_released = NULL; | 423 | struct sway_binding *binding_released = NULL; |
424 | get_active_binding(&keyboard->state_keycodes, | 424 | get_active_binding(&keyboard->state_keycodes, |
425 | config->current_mode->keycode_bindings, &binding_released, | 425 | config->current_mode->keycode_bindings, &binding_released, |
426 | keyinfo.code_modifiers, true, input_inhibited, | 426 | keyinfo.code_modifiers, true, locked, |
427 | shortcuts_inhibited, device_identifier, | 427 | shortcuts_inhibited, device_identifier, |
428 | exact_identifier, keyboard->effective_layout); | 428 | exact_identifier, keyboard->effective_layout); |
429 | get_active_binding(&keyboard->state_keysyms_raw, | 429 | get_active_binding(&keyboard->state_keysyms_raw, |
430 | config->current_mode->keysym_bindings, &binding_released, | 430 | config->current_mode->keysym_bindings, &binding_released, |
431 | keyinfo.raw_modifiers, true, input_inhibited, | 431 | keyinfo.raw_modifiers, true, locked, |
432 | shortcuts_inhibited, device_identifier, | 432 | shortcuts_inhibited, device_identifier, |
433 | exact_identifier, keyboard->effective_layout); | 433 | exact_identifier, keyboard->effective_layout); |
434 | get_active_binding(&keyboard->state_keysyms_translated, | 434 | get_active_binding(&keyboard->state_keysyms_translated, |
435 | config->current_mode->keysym_bindings, &binding_released, | 435 | config->current_mode->keysym_bindings, &binding_released, |
436 | keyinfo.translated_modifiers, true, input_inhibited, | 436 | keyinfo.translated_modifiers, true, locked, |
437 | shortcuts_inhibited, device_identifier, | 437 | shortcuts_inhibited, device_identifier, |
438 | exact_identifier, keyboard->effective_layout); | 438 | exact_identifier, keyboard->effective_layout); |
439 | 439 | ||
@@ -455,17 +455,17 @@ static void handle_key_event(struct sway_keyboard *keyboard, | |||
455 | if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) { | 455 | if (event->state == WL_KEYBOARD_KEY_STATE_PRESSED) { |
456 | get_active_binding(&keyboard->state_keycodes, | 456 | get_active_binding(&keyboard->state_keycodes, |
457 | config->current_mode->keycode_bindings, &binding, | 457 | config->current_mode->keycode_bindings, &binding, |
458 | keyinfo.code_modifiers, false, input_inhibited, | 458 | keyinfo.code_modifiers, false, locked, |
459 | shortcuts_inhibited, device_identifier, | 459 | shortcuts_inhibited, device_identifier, |
460 | exact_identifier, keyboard->effective_layout); | 460 | exact_identifier, keyboard->effective_layout); |
461 | get_active_binding(&keyboard->state_keysyms_raw, | 461 | get_active_binding(&keyboard->state_keysyms_raw, |
462 | config->current_mode->keysym_bindings, &binding, | 462 | config->current_mode->keysym_bindings, &binding, |
463 | keyinfo.raw_modifiers, false, input_inhibited, | 463 | keyinfo.raw_modifiers, false, locked, |
464 | shortcuts_inhibited, device_identifier, | 464 | shortcuts_inhibited, device_identifier, |
465 | exact_identifier, keyboard->effective_layout); | 465 | exact_identifier, keyboard->effective_layout); |
466 | get_active_binding(&keyboard->state_keysyms_translated, | 466 | get_active_binding(&keyboard->state_keysyms_translated, |
467 | config->current_mode->keysym_bindings, &binding, | 467 | config->current_mode->keysym_bindings, &binding, |
468 | keyinfo.translated_modifiers, false, input_inhibited, | 468 | keyinfo.translated_modifiers, false, locked, |
469 | shortcuts_inhibited, device_identifier, | 469 | shortcuts_inhibited, device_identifier, |
470 | exact_identifier, keyboard->effective_layout); | 470 | exact_identifier, keyboard->effective_layout); |
471 | } | 471 | } |
diff --git a/sway/input/switch.c b/sway/input/switch.c index 32d9c7e0..f483cd23 100644 --- a/sway/input/switch.c +++ b/sway/input/switch.c | |||
@@ -33,8 +33,8 @@ static bool sway_switch_trigger_test(enum sway_switch_trigger trigger, | |||
33 | } | 33 | } |
34 | 34 | ||
35 | static void execute_binding(struct sway_switch *sway_switch) { | 35 | static void execute_binding(struct sway_switch *sway_switch) { |
36 | struct sway_seat* seat = sway_switch->seat_device->sway_seat; | 36 | struct sway_seat *seat = sway_switch->seat_device->sway_seat; |
37 | bool input_inhibited = server.session_lock.locked; | 37 | bool locked = server.session_lock.locked; |
38 | 38 | ||
39 | list_t *bindings = config->current_mode->switch_bindings; | 39 | list_t *bindings = config->current_mode->switch_bindings; |
40 | struct sway_switch_binding *matched_binding = NULL; | 40 | struct sway_switch_binding *matched_binding = NULL; |
@@ -51,13 +51,13 @@ static void execute_binding(struct sway_switch *sway_switch) { | |||
51 | continue; | 51 | continue; |
52 | } | 52 | } |
53 | bool binding_locked = binding->flags & BINDING_LOCKED; | 53 | bool binding_locked = binding->flags & BINDING_LOCKED; |
54 | if (!binding_locked && input_inhibited) { | 54 | if (!binding_locked && locked) { |
55 | continue; | 55 | continue; |
56 | } | 56 | } |
57 | 57 | ||
58 | matched_binding = binding; | 58 | matched_binding = binding; |
59 | 59 | ||
60 | if (binding_locked == input_inhibited) { | 60 | if (binding_locked == locked) { |
61 | break; | 61 | break; |
62 | } | 62 | } |
63 | } | 63 | } |