swaybar: exit on display error

This commit is contained in:
Ian Fan 2018-10-23 12:22:51 +01:00
parent ebfb1388e2
commit 9afcda59db
1 changed files with 4 additions and 1 deletions

View File

@ -419,7 +419,10 @@ void bar_run(struct swaybar *bar) {
status_in, bar);
}
while (1) {
wl_display_flush(bar->display);
errno = 0;
if (wl_display_flush(bar->display) == -1 && errno != EAGAIN) {
break;
}
loop_poll(bar->eventloop);
}
}