diff options
author | gnidorah <gnidorah@users.noreply.github.com> | 2017-11-22 09:04:46 +0300 |
---|---|---|
committer | Calvin Lee <cyrus296@gmail.com> | 2017-12-29 12:11:51 -0700 |
commit | 4d34bc393e7b144fbc105537f17bee329c44814d (patch) | |
tree | ed17f848e7ac95c919d23424671a8a8ad5651a86 | |
parent | Fix icon updating on secondary outputs (diff) | |
download | sway-4d34bc393e7b144fbc105537f17bee329c44814d.tar.gz sway-4d34bc393e7b144fbc105537f17bee329c44814d.tar.zst sway-4d34bc393e7b144fbc105537f17bee329c44814d.zip |
Keep tray separate
-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 { | |||
29 | char *name; | 29 | char *name; |
30 | int idx; | 30 | int idx; |
31 | bool focused; | 31 | bool focused; |
32 | #ifdef ENABLE_TRAY | ||
32 | bool active; | 33 | bool active; |
34 | #endif | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | struct workspace { | 37 | 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) { | |||
295 | for (i = 0; i < bar->outputs->length; ++i) { | 295 | for (i = 0; i < bar->outputs->length; ++i) { |
296 | struct output *output = bar->outputs->items[i]; | 296 | struct output *output = bar->outputs->items[i]; |
297 | if (window_prerender(output->window) && output->window->cairo) { | 297 | if (window_prerender(output->window) && output->window->cairo) { |
298 | output->active = true; | ||
299 | render(output, bar->config, bar->status); | 298 | render(output, bar->config, bar->status); |
300 | window_render(output->window); | 299 | window_render(output->window); |
301 | wl_display_flush(output->registry->display); | 300 | wl_display_flush(output->registry->display); |
301 | #ifdef ENABLE_TRAY | ||
302 | output->active = true; | ||
302 | } else { | 303 | } else { |
303 | output->active = false; | 304 | output->active = false; |
305 | #endif | ||
304 | } | 306 | } |
305 | } | 307 | } |
306 | } | 308 | } |