mirror of
https://github.com/glfw/glfw.git
synced 2024-11-14 02:31:46 +00:00
Wayland: Continue poll() if timerfd can’t be read
In the case the key repeat timerfd was interrupted before read(), the cursor timerfd wasn’t read at all even when it could. Related to #1711
This commit is contained in:
parent
963e728881
commit
68879081cb
@ -278,6 +278,7 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: Some keys were not repeating in Wayland (#1908)
|
- [Wayland] Bugfix: Some keys were not repeating in Wayland (#1908)
|
||||||
- [Wayland] Bugfix: Non-arrow cursors are offset from the hotspot (#1706,#1899)
|
- [Wayland] Bugfix: Non-arrow cursors are offset from the hotspot (#1706,#1899)
|
||||||
- [Wayland] Bugfix: The `O_CLOEXEC` flag was not defined on FreeBSD
|
- [Wayland] Bugfix: The `O_CLOEXEC` flag was not defined on FreeBSD
|
||||||
|
- [Wayland] Bugfix: Key repeat could lead to a race condition (#1710)
|
||||||
- [POSIX] Removed use of deprecated function `gettimeofday`
|
- [POSIX] Removed use of deprecated function `gettimeofday`
|
||||||
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
||||||
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
||||||
|
@ -751,10 +751,7 @@ static void handleEvents(int timeout)
|
|||||||
if (fds[1].revents & POLLIN)
|
if (fds[1].revents & POLLIN)
|
||||||
{
|
{
|
||||||
read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
|
read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
|
||||||
if (read_ret != 8)
|
if (read_ret == 8 && _glfw.wl.keyboardFocus)
|
||||||
return;
|
|
||||||
|
|
||||||
if (_glfw.wl.keyboardFocus)
|
|
||||||
{
|
{
|
||||||
for (uint64_t i = 0; i < repeats; ++i)
|
for (uint64_t i = 0; i < repeats; ++i)
|
||||||
{
|
{
|
||||||
@ -770,9 +767,7 @@ static void handleEvents(int timeout)
|
|||||||
if (fds[2].revents & POLLIN)
|
if (fds[2].revents & POLLIN)
|
||||||
{
|
{
|
||||||
read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
|
read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
|
||||||
if (read_ret != 8)
|
if (read_ret == 8)
|
||||||
return;
|
|
||||||
|
|
||||||
incrementCursorImage(_glfw.wl.pointerFocus);
|
incrementCursorImage(_glfw.wl.pointerFocus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user