aboutsummaryrefslogtreecommitdiff
path: root/swaybar/render.c
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-10-28 10:25:47 +0000
committerIan Fan <ianfan0@gmail.com>2018-12-31 20:40:18 +0000
commit5f65f339896fadf0011b75d78c869594876d35d9 (patch)
treebbb234ad123657f1a8ed1f311cf9183b67e7e961 /swaybar/render.c
parent598e950296ce9fef24b54b4c01302ee68473fb8a (diff)
swaybar: add tray interface
Diffstat (limited to 'swaybar/render.c')
-rw-r--r--swaybar/render.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index 96118c42..9fe4ee9c 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -14,6 +14,9 @@
#include "swaybar/ipc.h"
#include "swaybar/render.h"
#include "swaybar/status_line.h"
+#if HAVE_TRAY
+#include "swaybar/tray/tray.h"
+#endif
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
static const int WS_HORIZONTAL_PADDING = 5;
@@ -453,6 +456,12 @@ static uint32_t render_to_cairo(cairo_t *cairo, struct swaybar_output *output) {
* utilize the available space.
*/
double x = output->width * output->scale;
+#if HAVE_TRAY
+ if (bar->tray) {
+ uint32_t h = render_tray(cairo, output, &x);
+ max_height = h > max_height ? h : max_height;
+ }
+#endif
if (bar->status) {
uint32_t h = render_status_line(cairo, output, &x);
max_height = h > max_height ? h : max_height;