From 4d34bc393e7b144fbc105537f17bee329c44814d Mon Sep 17 00:00:00 2001 From: gnidorah Date: Wed, 22 Nov 2017 09:04:46 +0300 Subject: Keep tray separate --- include/swaybar/bar.h | 2 ++ swaybar/bar.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 } } } -- cgit v1.2.3