set O_NONBLOCK on repeat timerfd

This commit is contained in:
Stone Tickle 2020-06-05 12:51:25 +09:00
parent bf1c62b261
commit 245a7e2d58
No known key found for this signature in database
GPG Key ID: 4DF34BD9C2622309

View File

@ -1154,8 +1154,9 @@ int _glfwPlatformInit(void)
_glfwInitTimerPOSIX(); _glfwInitTimerPOSIX();
_glfw.wl.timerfd = -1; _glfw.wl.timerfd = -1;
if (_glfw.wl.seatVersion >= 4) 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) if (!_glfw.wl.wmBase)
{ {