sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit a71bbdd3220540b56848f10739ccb2226e2b8f97
parent 2e03a61262746b882e82033914afae950a9fa2b2
Author: Simon Ser <contact@emersion.fr>
Date:   Thu,  8 Jul 2021 13:16:11 +0200

swaybar: exit cleanly when disconnected from IPC

Diffstat:
Mswaybar/bar.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git 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); }