mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
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.
(cherry picked from commit e24fe4b189
)
This commit is contained in:
parent
3b806aef27
commit
9240ee5ddf
@ -125,6 +125,7 @@ information on what to include when reporting a bug.
|
|||||||
|
|
||||||
- [Wayland] Bugfix: Key repeat could lead to a race condition (#1710)
|
- [Wayland] Bugfix: Key repeat could lead to a race condition (#1710)
|
||||||
- [Wayland] Bugfix: Activating a window would emit two input focus events
|
- [Wayland] Bugfix: Activating a window would emit two input focus events
|
||||||
|
- [Wayland] Bugfix: Disable key repeat mechanism when window loses input focus
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -503,6 +503,9 @@ static void keyboardHandleLeave(void* data,
|
|||||||
_glfw.wl.serial = serial;
|
_glfw.wl.serial = serial;
|
||||||
_glfw.wl.keyboardFocus = NULL;
|
_glfw.wl.keyboardFocus = NULL;
|
||||||
_glfwInputWindowFocus(window, GLFW_FALSE);
|
_glfwInputWindowFocus(window, GLFW_FALSE);
|
||||||
|
|
||||||
|
struct itimerspec timer = {};
|
||||||
|
timerfd_settime(_glfw.wl.timerfd, 0, &timer, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int toGLFWKeyCode(uint32_t key)
|
static int toGLFWKeyCode(uint32_t key)
|
||||||
|
Loading…
Reference in New Issue
Block a user