diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-10-27 18:21:36 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-10-27 18:21:36 +0000 |
| commit | 4a63defeb16cbf41054196440532b35cc7c97a54 (patch) | |
| tree | cc4fed6b935d76f8be8a1e63140839fe711767b2 /main.c | |
| parent | main: cleanup (diff) | |
wayland: backend now configures FD as non-blocking, not main
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -588,20 +588,6 @@ main(int argc, char *const *argv) } } - - { - int fd = wl_display_get_fd(term.wl->display); - int fd_flags = fcntl(fd, F_GETFL); - if (fd_flags == -1) { - LOG_ERRNO("failed to set non blocking mode on Wayland display connection"); - goto out; - } - if (fcntl(fd, F_SETFL, fd_flags | O_NONBLOCK) == -1) { - LOG_ERRNO("failed to set non blocking mode on Wayland display connection"); - goto out; - } - } - fdm_add(fdm, term.ptmx, EPOLLIN, &fdm_ptmx, &term); fdm_add(fdm, term.flash.fd, EPOLLIN, &fdm_flash, &term); fdm_add(fdm, term.blink.fd, EPOLLIN, &fdm_blink, &term); @@ -609,7 +595,8 @@ main(int argc, char *const *argv) fdm_add(fdm, term.delayed_render_timer.upper_fd, EPOLLIN, &fdm_delayed_render, &term); while (true) { - wl_display_flush(term.wl->display); + wl_display_flush(term.wl->display); /* TODO: figure out how to get rid of this */ + if (!fdm_poll(fdm)) break; } |
