mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Remove unneeded variable
This commit is contained in:
parent
82423991a8
commit
88a5e26c6e
|
@ -264,29 +264,27 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Identify and execute active pressed binding
|
// Identify and execute active pressed binding
|
||||||
struct sway_binding *next_repeat_binding = NULL;
|
struct sway_binding *binding = NULL;
|
||||||
if (event->state == WLR_KEY_PRESSED) {
|
if (event->state == WLR_KEY_PRESSED) {
|
||||||
struct sway_binding *binding_pressed = NULL;
|
|
||||||
get_active_binding(&keyboard->state_keycodes,
|
get_active_binding(&keyboard->state_keycodes,
|
||||||
config->current_mode->keycode_bindings, &binding_pressed,
|
config->current_mode->keycode_bindings, &binding,
|
||||||
code_modifiers, false, input_inhibited);
|
code_modifiers, false, input_inhibited);
|
||||||
get_active_binding(&keyboard->state_keysyms_translated,
|
get_active_binding(&keyboard->state_keysyms_translated,
|
||||||
config->current_mode->keysym_bindings, &binding_pressed,
|
config->current_mode->keysym_bindings, &binding,
|
||||||
translated_modifiers, false, input_inhibited);
|
translated_modifiers, false, input_inhibited);
|
||||||
get_active_binding(&keyboard->state_keysyms_raw,
|
get_active_binding(&keyboard->state_keysyms_raw,
|
||||||
config->current_mode->keysym_bindings, &binding_pressed,
|
config->current_mode->keysym_bindings, &binding,
|
||||||
raw_modifiers, false, input_inhibited);
|
raw_modifiers, false, input_inhibited);
|
||||||
|
|
||||||
if (binding_pressed) {
|
if (binding) {
|
||||||
next_repeat_binding = binding_pressed;
|
seat_execute_command(seat, binding);
|
||||||
seat_execute_command(seat, binding_pressed);
|
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up (or clear) keyboard repeat for a pressed binding
|
// Set up (or clear) keyboard repeat for a pressed binding
|
||||||
if (next_repeat_binding && wlr_device->keyboard->repeat_info.delay > 0) {
|
if (binding && wlr_device->keyboard->repeat_info.delay > 0) {
|
||||||
keyboard->repeat_binding = next_repeat_binding;
|
keyboard->repeat_binding = binding;
|
||||||
if (wl_event_source_timer_update(keyboard->key_repeat_source,
|
if (wl_event_source_timer_update(keyboard->key_repeat_source,
|
||||||
wlr_device->keyboard->repeat_info.delay) < 0) {
|
wlr_device->keyboard->repeat_info.delay) < 0) {
|
||||||
wlr_log(WLR_DEBUG, "failed to set key repeat timer");
|
wlr_log(WLR_DEBUG, "failed to set key repeat timer");
|
||||||
|
|
Loading…
Reference in a new issue