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

View file

@ -22,7 +22,6 @@ static uint32_t render_status_line_text(cairo_t *cairo,
if (!status->text) {
return 0;
}
//wlr_log(L_DEBUG, "focused %d", focused);
cairo_set_source_u32(cairo, focused ?
config->colors.focused_statusline : config->colors.statusline);
static const int margin = 3;