mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 01:41:30 +00:00
Always send POLLHUP and POLLERR with event loop
This commit is contained in:
parent
8e32c4a1fb
commit
e0107c4dd7
|
@ -118,7 +118,10 @@ void event_loop_poll() {
|
||||||
struct pollfd pfd = event_loop.fds.items[i];
|
struct pollfd pfd = event_loop.fds.items[i];
|
||||||
struct event_item *item = (struct event_item *)event_loop.items->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);
|
item->cb(pfd.fd, pfd.revents, item->data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue