diff options
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index dbb0c359..dbf2ce01 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <assert.h> | 1 | #include <assert.h> |
2 | #include <limits.h> | ||
2 | #include <wlr/backend/multi.h> | 3 | #include <wlr/backend/multi.h> |
3 | #include <wlr/backend/session.h> | 4 | #include <wlr/backend/session.h> |
4 | #include "sway/input/seat.h" | 5 | #include "sway/input/seat.h" |
@@ -479,7 +480,13 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) { | |||
479 | keyboard->keymap = keymap; | 480 | keyboard->keymap = keymap; |
480 | wlr_keyboard_set_keymap(wlr_device->keyboard, keyboard->keymap); | 481 | wlr_keyboard_set_keymap(wlr_device->keyboard, keyboard->keymap); |
481 | 482 | ||
482 | wlr_keyboard_set_repeat_info(wlr_device->keyboard, 25, 600); | 483 | if (input_config && input_config->repeat_delay != INT_MIN |
484 | && input_config->repeat_rate != INT_MIN) { | ||
485 | wlr_keyboard_set_repeat_info(wlr_device->keyboard, | ||
486 | input_config->repeat_rate, input_config->repeat_delay); | ||
487 | } else { | ||
488 | wlr_keyboard_set_repeat_info(wlr_device->keyboard, 25, 600); | ||
489 | } | ||
483 | xkb_context_unref(context); | 490 | xkb_context_unref(context); |
484 | struct wlr_seat *seat = keyboard->seat_device->sway_seat->wlr_seat; | 491 | struct wlr_seat *seat = keyboard->seat_device->sway_seat->wlr_seat; |
485 | wlr_seat_set_keyboard(seat, wlr_device); | 492 | wlr_seat_set_keyboard(seat, wlr_device); |