mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-27 01:40:16 -05:00
wayland: make wayland socket non-blocking
This commit is contained in:
parent
a07de9ef3c
commit
832e6f1370
1 changed files with 6 additions and 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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue