Tear down bar when display exits

This commit is contained in:
Drew DeVault 2018-03-29 15:36:52 -04:00
parent 0464a9910d
commit da6e48520b
2 changed files with 2 additions and 2 deletions

View file

@ -148,7 +148,8 @@ static void render_all_frames(struct swaybar *bar) {
static void display_in(int fd, short mask, void *_bar) {
struct swaybar *bar = (struct swaybar *)_bar;
if (wl_display_dispatch(bar->display) == -1) {
wlr_log(L_ERROR, "failed to dispatch wl: %d", errno);
bar_teardown(bar);
exit(0);
}
}