diff options
| -rw-r--r-- | include/swaybar/bar.h | 2 | ||||
| -rw-r--r-- | swaybar/bar.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 96c4365c..7ec09e3e 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h @@ -29,7 +29,9 @@ struct output { char *name; int idx; bool focused; +#ifdef ENABLE_TRAY bool active; +#endif }; struct workspace { diff --git a/swaybar/bar.c b/swaybar/bar.c index 49a698b7..f1b42d2c 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -295,12 +295,14 @@ void bar_run(struct bar *bar) { for (i = 0; i < bar->outputs->length; ++i) { struct output *output = bar->outputs->items[i]; if (window_prerender(output->window) && output->window->cairo) { - output->active = true; render(output, bar->config, bar->status); window_render(output->window); wl_display_flush(output->registry->display); +#ifdef ENABLE_TRAY + output->active = true; } else { output->active = false; +#endif } } } |
