diff options
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index efd27f70..00fc6a13 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -549,13 +549,17 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) { | |||
549 | wlr_keyboard_led_update(wlr_device->keyboard, leds); | 549 | wlr_keyboard_led_update(wlr_device->keyboard, leds); |
550 | } | 550 | } |
551 | 551 | ||
552 | if (input_config && input_config->repeat_delay != INT_MIN | 552 | int repeat_rate = 25; |
553 | && input_config->repeat_rate != INT_MIN) { | 553 | if (input_config && input_config->repeat_rate != INT_MIN) { |
554 | wlr_keyboard_set_repeat_info(wlr_device->keyboard, | 554 | repeat_rate = input_config->repeat_rate; |
555 | input_config->repeat_rate, input_config->repeat_delay); | 555 | } |
556 | } else { | 556 | int repeat_delay = 600; |
557 | wlr_keyboard_set_repeat_info(wlr_device->keyboard, 25, 600); | 557 | if (input_config && input_config->repeat_delay != INT_MIN) { |
558 | repeat_delay = input_config->repeat_delay; | ||
558 | } | 559 | } |
560 | wlr_keyboard_set_repeat_info(wlr_device->keyboard, repeat_rate, | ||
561 | repeat_delay); | ||
562 | |||
559 | xkb_context_unref(context); | 563 | xkb_context_unref(context); |
560 | struct wlr_seat *seat = keyboard->seat_device->sway_seat->wlr_seat; | 564 | struct wlr_seat *seat = keyboard->seat_device->sway_seat->wlr_seat; |
561 | wlr_seat_set_keyboard(seat, wlr_device); | 565 | wlr_seat_set_keyboard(seat, wlr_device); |