diff options
author | 2018-12-31 15:43:23 -0500 | |
---|---|---|
committer | 2018-12-31 15:43:23 -0500 | |
commit | 3d7c20f062bebe39199d3872e5b64d5e8d61d100 (patch) | |
tree | 93b8ddb51873cae14db8d5f07db74ca96236f184 /swaybar/render.c | |
parent | Apply implicit fallback seat config (diff) | |
parent | swaybar: use KDE's SNI IconThemePath property (diff) | |
download | sway-3d7c20f062bebe39199d3872e5b64d5e8d61d100.tar.gz sway-3d7c20f062bebe39199d3872e5b64d5e8d61d100.tar.zst sway-3d7c20f062bebe39199d3872e5b64d5e8d61d100.zip |
Merge pull request #3249 from ianyfan/tray
Swaybar tray
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 9 |
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 @@ | |||
14 | #include "swaybar/ipc.h" | 14 | #include "swaybar/ipc.h" |
15 | #include "swaybar/render.h" | 15 | #include "swaybar/render.h" |
16 | #include "swaybar/status_line.h" | 16 | #include "swaybar/status_line.h" |
17 | #if HAVE_TRAY | ||
18 | #include "swaybar/tray/tray.h" | ||
19 | #endif | ||
17 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" | 20 | #include "wlr-layer-shell-unstable-v1-client-protocol.h" |
18 | 21 | ||
19 | static const int WS_HORIZONTAL_PADDING = 5; | 22 | static const int WS_HORIZONTAL_PADDING = 5; |
@@ -453,6 +456,12 @@ static uint32_t render_to_cairo(cairo_t *cairo, struct swaybar_output *output) { | |||
453 | * utilize the available space. | 456 | * utilize the available space. |
454 | */ | 457 | */ |
455 | double x = output->width * output->scale; | 458 | double x = output->width * output->scale; |
459 | #if HAVE_TRAY | ||
460 | if (bar->tray) { | ||
461 | uint32_t h = render_tray(cairo, output, &x); | ||
462 | max_height = h > max_height ? h : max_height; | ||
463 | } | ||
464 | #endif | ||
456 | if (bar->status) { | 465 | if (bar->status) { |
457 | uint32_t h = render_status_line(cairo, output, &x); | 466 | uint32_t h = render_status_line(cairo, output, &x); |
458 | max_height = h > max_height ? h : max_height; | 467 | max_height = h > max_height ? h : max_height; |