Skip to content

Commit

Permalink
Wayland: Set O_NONBLOCK on repeat timerfd
Browse files Browse the repository at this point in the history
Fixes glfw#1710
Fixes glfw#1711
  • Loading branch information
annacrombie authored and linkmauve committed Dec 14, 2021
1 parent 900848a commit 963e728
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ int _glfwInitWayland(void)

_glfw.wl.timerfd = -1;
if (_glfw.wl.seatVersion >= 4)
_glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
_glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);

if (!_glfw.wl.wmBase)
{
Expand Down Expand Up @@ -1370,7 +1370,7 @@ int _glfwInitWayland(void)
wl_cursor_theme_load(cursorTheme, 2 * cursorSize, _glfw.wl.shm);
_glfw.wl.cursorSurface =
wl_compositor_create_surface(_glfw.wl.compositor);
_glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
_glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
}

if (_glfw.wl.seat && _glfw.wl.dataDeviceManager)
Expand Down

0 comments on commit 963e728

Please sign in to comment.