From d86babb14eeec29c10aff7bd1ce3e020c1a92267 Mon Sep 17 00:00:00 2001 From: ninja- Date: Tue, 30 Jun 2020 19:41:51 +0200 Subject: [PATCH] wayland: set O_NONBLOCK on repeat timerfd - fix 100% cpu --- src/wl_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wl_init.c b/src/wl_init.c index 382d5ff58..3ffd966e7 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -1201,7 +1201,7 @@ int _glfwPlatformInit(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); #ifndef WITH_DECORATION if (!_glfw.wl.wmBase)