Wayland: Fix key repeat continuing when refocused

If a window lost input focus while a key was held down, the key repeat
mechanism would resume once the window regained focus.
This commit is contained in:
Camilla Löwy
2021-12-22 14:19:55 +01:00
parent c2f0a0ae59
commit e24fe4b189
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -508,6 +508,9 @@ static void keyboardHandleLeave(void* data,
_glfw.wl.serial = serial;
_glfw.wl.keyboardFocus = NULL;
_glfwInputWindowFocus(window, GLFW_FALSE);
struct itimerspec timer = {};
timerfd_settime(_glfw.wl.timerfd, 0, &timer, NULL);
}
static int toGLFWKeyCode(uint32_t key)