(prevents infinite loop when your compositor crashes)
---
main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/main.c b/main.c
index b1cdfef..a17812c 100644
--- a/main.c
+++ b/main.c
@@ -1025,6 +1025,12 @@ main(int argc, char **argv)
if (fds[WAYLAND_FD].revents & POLLIN)
wl_display_dispatch(display);
+ if (fds[WAYLAND_FD].revents & POLLERR) {
+ die("Exceptional condition on wayland socket.\n");
+ }
+ if (fds[WAYLAND_FD].revents & POLLHUP) {
+ die("Wayland socket has been disconnected.\n");
+ }
if (fds[SIGNAL_FD].revents & POLLIN) {
struct signalfd_siginfo si;
--
2.43.0