diff options
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r-- | swaybar/bar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index 74c1924f..2b11065f 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -468,6 +468,13 @@ static void display_in(int fd, short mask, void *data) { static void ipc_in(int fd, short mask, void *data) { struct swaybar *bar = data; + if (mask & (POLLHUP | POLLERR)) { + if (mask & POLLERR) { + sway_log(SWAY_ERROR, "IPC poll error"); + } + bar->running = false; + return; + } if (handle_ipc_readable(bar)) { set_bar_dirty(bar); } |