mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +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:
+3
-8
@@ -751,10 +751,7 @@ static void handleEvents(int timeout)
|
||||
if (fds[1].revents & POLLIN)
|
||||
{
|
||||
read_ret = read(_glfw.wl.timerfd, &repeats, sizeof(repeats));
|
||||
if (read_ret != 8)
|
||||
return;
|
||||
|
||||
if (_glfw.wl.keyboardFocus)
|
||||
if (read_ret == 8 && _glfw.wl.keyboardFocus)
|
||||
{
|
||||
for (uint64_t i = 0; i < repeats; ++i)
|
||||
{
|
||||
@@ -770,10 +767,8 @@ static void handleEvents(int timeout)
|
||||
if (fds[2].revents & POLLIN)
|
||||
{
|
||||
read_ret = read(_glfw.wl.cursorTimerfd, &repeats, sizeof(repeats));
|
||||
if (read_ret != 8)
|
||||
return;
|
||||
|
||||
incrementCursorImage(_glfw.wl.pointerFocus);
|
||||
if (read_ret == 8)
|
||||
incrementCursorImage(_glfw.wl.pointerFocus);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user