Wayland: Fix key repeat halting

Key repeat shoud only be halted when the repeating key
is released, not when another key is released.
This commit is contained in:
Jan Hendrik Farr
2024-05-31 01:42:53 +02:00
committed by Doug Binks
parent 161fb1b6f6
commit 768e81a0eb
3 changed files with 5 additions and 2 deletions

View File

@@ -1838,11 +1838,12 @@ static void keyboardHandleKey(void* userData,
timer.it_value.tv_sec = _glfw.wl.keyRepeatDelay / 1000;
timer.it_value.tv_nsec = (_glfw.wl.keyRepeatDelay % 1000) * 1000000;
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
}
} else if (scancode == _glfw.wl.keyRepeatScancode) {
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
}
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
_glfwInputKey(window, key, scancode, action, _glfw.wl.xkb.modifiers);
if (action == GLFW_PRESS)