diff options
author | Scott Anderson <scott@anderso.nz> | 2018-04-21 13:44:32 +1200 |
---|---|---|
committer | Scott Anderson <scott@anderso.nz> | 2018-04-21 13:44:32 +1200 |
commit | e0107c4dd7baec5845d16fa151b18f33159c3729 (patch) | |
tree | 1574bcd54d1316dfc7f9c934cd7aeffcc8cf981e /swaybar/event_loop.c | |
parent | 8e32c4a1fb287d1a3675f3359891d909dc2b9456 (diff) |
Always send POLLHUP and POLLERR with event loop
Diffstat (limited to 'swaybar/event_loop.c')
-rw-r--r-- | swaybar/event_loop.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/swaybar/event_loop.c b/swaybar/event_loop.c index 748372ed..1e0d426b 100644 --- a/swaybar/event_loop.c +++ b/swaybar/event_loop.c @@ -118,7 +118,10 @@ void event_loop_poll() { struct pollfd pfd = event_loop.fds.items[i]; struct event_item *item = (struct event_item *)event_loop.items->items[i]; - if (pfd.revents & pfd.events) { + // Always send these events + unsigned events = pfd.events | POLLHUP | POLLERR; + + if (pfd.revents & events) { item->cb(pfd.fd, pfd.revents, item->data); } } |