mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Wayland: Reset key repeat timer on window destruction
Windows with keyboard focus may have an active key repeat timer. This should be reset when the window is closed, or key repeat events could be sent to a NULL window were it not for the quickfix in PR #2732. Fixes #2741 Probably the source of #2727
This commit is contained in:
@@ -2187,7 +2187,12 @@ void _glfwDestroyWindowWayland(_GLFWwindow* window)
|
||||
_glfw.wl.pointerFocus = NULL;
|
||||
|
||||
if (window == _glfw.wl.keyboardFocus)
|
||||
{
|
||||
struct itimerspec timer = {0};
|
||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||
|
||||
_glfw.wl.keyboardFocus = NULL;
|
||||
}
|
||||
|
||||
if (window->wl.fractionalScale)
|
||||
wp_fractional_scale_v1_destroy(window->wl.fractionalScale);
|
||||
|
||||
Reference in New Issue
Block a user