From b7bcd5cb8f2fda4e2ef5c18907eb3c4d9fa73e8a Mon Sep 17 00:00:00 2001 From: Sixels Date: Tue, 19 Apr 2022 14:14:46 -0300 Subject: [PATCH] Handle negative delay and rate --- src/managers/InputManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index 4d2c7b10..219acdac 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -212,7 +212,7 @@ void CInputManager::newKeyboard(wlr_input_device* keyboard) { wlr_keyboard_set_keymap(keyboard->keyboard, KEYMAP); xkb_keymap_unref(KEYMAP); xkb_context_unref(CONTEXT); - wlr_keyboard_set_repeat_info(keyboard->keyboard, REPEATRATE, REPEATDELAY); + wlr_keyboard_set_repeat_info(keyboard->keyboard, std::max(0, REPEATRATE), std::max(0, REPEATDELAY)); PNEWKEYBOARD->hyprListener_keyboardMod.initCallback(&keyboard->keyboard->events.modifiers, &Events::listener_keyboardMod, PNEWKEYBOARD, "Keyboard"); PNEWKEYBOARD->hyprListener_keyboardKey.initCallback(&keyboard->keyboard->events.key, &Events::listener_keyboardKey, PNEWKEYBOARD, "Keyboard");