diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-29 10:38:17 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-29 22:11:08 -0400 |
commit | 86ba0fc15d7615b09f0279616d538af5c23bc551 (patch) | |
tree | 374d19c070eafb5ea50335d01152416242af1bc0 /swaybar/bar.c | |
parent | 3a458cd7b55bdfad1b04a01064f4fe8fa86ed0de (diff) |
Re-render bar on IPC updates
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r-- | swaybar/bar.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index 68dea408..90fd5ad4 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -143,11 +143,17 @@ static void display_in(int fd, short mask, void *_bar) { static void ipc_in(int fd, short mask, void *_bar) { struct swaybar *bar = (struct swaybar *)_bar; - handle_ipc_event(bar); + if (handle_ipc_event(bar)) { + struct swaybar_output *output; + wl_list_for_each(output, &bar->outputs, link) { + render_frame(bar, output); + } + } } void bar_run(struct swaybar *bar) { add_event(wl_display_get_fd(bar->display), POLLIN, display_in, bar); + add_event(bar->ipc_event_socketfd, POLLIN, ipc_in, bar); while (1) { event_loop_poll(); } |