diff options
| -rw-r--r-- | dbar.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -12,6 +12,7 @@ #include <fcntl.h> #include <errno.h> #include <sys/inotify.h> +#include <malloc.h> #include "drw.h" #include "util.h" @@ -136,6 +137,8 @@ draw_frame(Bar *bar) draw_font(canvas, font, tag->name, x, height - padding, foreground); } + if (bar->clients & (1 << i)) + draw_rect(canvas, x - padding + 2, 2, 5, 5, foreground); x += padding + w; ++i; @@ -313,7 +316,11 @@ dwl_output_tag(void *data, struct zdwl_output_v1 *zdwl_output_v1, uint32_t tag, bar->urgtag &= ~(1 << tag); } - bar->clients = clients; + if (clients) { + bar->clients |= 1 << tag; + } else { + bar->clients &= ~(1 << tag); + } if (++bar->update_count == bar_state.tags.size) { update_bar(bar); |