mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-25 21:58:31 +01:00
swaybar: exit cleanly when disconnected from IPC
This commit is contained in:
parent
2e03a61262
commit
a71bbdd322
1 changed files with 7 additions and 0 deletions
|
@ -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