Wayland: Control key repeat via timerfd state

The key repeat logic is now controlled only via the key repeat timerfd.

(cherry picked from commit 850893a39f)
This commit is contained in:
Camilla Löwy
2021-12-27 00:52:24 +01:00
parent 5e8186af0a
commit 5f0b316c24
2 changed files with 9 additions and 12 deletions
+6 -9
View File
@@ -865,16 +865,13 @@ static void handleEvents(int timeout)
if (read(_glfw.wl.timerfd, &repeats, sizeof(repeats)) == 8)
{
if (_glfw.wl.keyboardFocus)
for (uint64_t i = 0; i < repeats; i++)
{
for (uint64_t i = 0; i < repeats; i++)
{
_glfwInputKey(_glfw.wl.keyboardFocus,
_glfw.wl.keyboardLastKey,
_glfw.wl.keyboardLastScancode,
GLFW_REPEAT,
_glfw.wl.xkb.modifiers);
}
_glfwInputKey(_glfw.wl.keyboardFocus,
_glfw.wl.keyboardLastKey,
_glfw.wl.keyboardLastScancode,
GLFW_REPEAT,
_glfw.wl.xkb.modifiers);
}
}
}