wayland: set O_NONBLOCK on repeat timerfd - fix 100% cpu

This commit is contained in:
ninja- 2020-06-30 19:41:51 +02:00
parent e89e9aee41
commit d86babb14e

View File

@ -1201,7 +1201,7 @@ int _glfwPlatformInit(void)
_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);
#ifndef WITH_DECORATION #ifndef WITH_DECORATION
if (!_glfw.wl.wmBase) if (!_glfw.wl.wmBase)