mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
swaybar: exit cleanly when disconnected from IPC
This commit is contained in:
parent
2e03a61262
commit
a71bbdd322
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue