diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-10 18:22:59 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-10 18:22:59 +0000 |
| commit | 832e6f1370ec70ec654aa4c80a253fd0333e5392 (patch) | |
| tree | cd98997e5ce069cfe94add0976d1c17f2adf2a56 | |
| parent | fdm: fix log message (diff) | |
wayland: make wayland socket non-blocking
| -rw-r--r-- | wayland.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -720,6 +720,12 @@ wayl_init(const struct config *conf, struct fdm *fdm) /* All wayland initialization done - make it so */ wl_display_roundtrip(wayl->display); + int wl_fd = wl_display_get_fd(wayl->display); + if (fcntl(wl_fd, F_SETFL, fcntl(wl_fd, F_GETFL) | O_NONBLOCK) < 0) { + LOG_ERRNO("failed to make Wayland socket non-blocking"); + goto out; + } + wayl->kbd.repeat.fd = timerfd_create(CLOCK_BOOTTIME, TFD_CLOEXEC | TFD_NONBLOCK); if (wayl->kbd.repeat.fd == -1) { LOG_ERRNO("failed to create keyboard repeat timer FD"); |
