diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-08 20:40:47 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-08 20:40:47 +1000 |
commit | 88a5e26c6eeb28cf934401d377654236fdf8cdfd (patch) | |
tree | a171bd040dbb9a7ffc75725cdd9a6e58ea14c159 /sway/input/keyboard.c | |
parent | Reload config using idle event (diff) | |
download | sway-88a5e26c6eeb28cf934401d377654236fdf8cdfd.tar.gz sway-88a5e26c6eeb28cf934401d377654236fdf8cdfd.tar.zst sway-88a5e26c6eeb28cf934401d377654236fdf8cdfd.zip |
Remove unneeded variable
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 0e14c036..fb1fe7b5 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -264,29 +264,27 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) { | |||
264 | } | 264 | } |
265 | 265 | ||
266 | // Identify and execute active pressed binding | 266 | // Identify and execute active pressed binding |
267 | struct sway_binding *next_repeat_binding = NULL; | 267 | struct sway_binding *binding = NULL; |
268 | if (event->state == WLR_KEY_PRESSED) { | 268 | if (event->state == WLR_KEY_PRESSED) { |
269 | struct sway_binding *binding_pressed = NULL; | ||
270 | get_active_binding(&keyboard->state_keycodes, | 269 | get_active_binding(&keyboard->state_keycodes, |
271 | config->current_mode->keycode_bindings, &binding_pressed, | 270 | config->current_mode->keycode_bindings, &binding, |
272 | code_modifiers, false, input_inhibited); | 271 | code_modifiers, false, input_inhibited); |
273 | get_active_binding(&keyboard->state_keysyms_translated, | 272 | get_active_binding(&keyboard->state_keysyms_translated, |
274 | config->current_mode->keysym_bindings, &binding_pressed, | 273 | config->current_mode->keysym_bindings, &binding, |
275 | translated_modifiers, false, input_inhibited); | 274 | translated_modifiers, false, input_inhibited); |
276 | get_active_binding(&keyboard->state_keysyms_raw, | 275 | get_active_binding(&keyboard->state_keysyms_raw, |
277 | config->current_mode->keysym_bindings, &binding_pressed, | 276 | config->current_mode->keysym_bindings, &binding, |
278 | raw_modifiers, false, input_inhibited); | 277 | raw_modifiers, false, input_inhibited); |
279 | 278 | ||
280 | if (binding_pressed) { | 279 | if (binding) { |
281 | next_repeat_binding = binding_pressed; | 280 | seat_execute_command(seat, binding); |
282 | seat_execute_command(seat, binding_pressed); | ||
283 | handled = true; | 281 | handled = true; |
284 | } | 282 | } |
285 | } | 283 | } |
286 | 284 | ||
287 | // Set up (or clear) keyboard repeat for a pressed binding | 285 | // Set up (or clear) keyboard repeat for a pressed binding |
288 | if (next_repeat_binding && wlr_device->keyboard->repeat_info.delay > 0) { | 286 | if (binding && wlr_device->keyboard->repeat_info.delay > 0) { |
289 | keyboard->repeat_binding = next_repeat_binding; | 287 | keyboard->repeat_binding = binding; |
290 | if (wl_event_source_timer_update(keyboard->key_repeat_source, | 288 | if (wl_event_source_timer_update(keyboard->key_repeat_source, |
291 | wlr_device->keyboard->repeat_info.delay) < 0) { | 289 | wlr_device->keyboard->repeat_info.delay) < 0) { |
292 | wlr_log(WLR_DEBUG, "failed to set key repeat timer"); | 290 | wlr_log(WLR_DEBUG, "failed to set key repeat timer"); |