diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-10-23 12:22:51 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-10-23 12:22:51 +0100 |
commit | 9afcda59dba5787817b50a74c254ccb790549e3c (patch) | |
tree | 1dd1292e61d525d23e4ef9c1ed37beef5e2c2eb5 | |
parent | ebfb1388e2b178ecee1c1e1f4b5160af0efe2db6 (diff) |
swaybar: exit on display error
-rw-r--r-- | swaybar/bar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index 1439a11c..3661c637 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -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); } } |