From 43aec9ca18c850f40bf2c23e461f8bf6ddd87a51 Mon Sep 17 00:00:00 2001 From: Andrey Butirsky Date: Sat, 30 Oct 2021 01:41:16 +0300 Subject: [PATCH] fixup! [wayland] fix ignored keyboard RepeatRate Ceiling so that it repeats on minimal 0.x rates accessible via UI BUG: 443721 --- src/keyboard_input.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/keyboard_input.cpp b/src/keyboard_input.cpp index fb22d72884..bfc78b2cad 100644 --- a/src/keyboard_input.cpp +++ b/src/keyboard_input.cpp @@ -29,6 +29,8 @@ // Qt #include +#include + namespace KWin { @@ -150,7 +152,7 @@ void KeyboardInputRedirection::reconfigure() if (waylandServer()->seat()->keyboard()) { const auto config = InputConfig::self()->inputConfig()->group(QStringLiteral("Keyboard")); const int delay = config.readEntry("RepeatDelay", 660); - const int rate = int(config.readEntry("RepeatRate", 25.0)); + const int rate = std::ceil(config.readEntry("RepeatRate", 25.0)); const QString repeatMode = config.readEntry("KeyRepeat", "repeat"); // when the clients will repeat the character or turn repeat key events into an accent character selection, we want // to tell the clients that we are indeed repeating keys.