From 31cd35bf849338a5c66d66f81c7c27ba73fd393f Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Sat, 18 Jul 2026 18:31:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(bar):=20=E6=96=B0=E5=A2=9E=20tray=5Foutput?= =?UTF-8?q?=5Findex=20=E9=85=8D=E7=BD=AE=E7=94=A8=E4=BA=8E=E9=80=89?= =?UTF-8?q?=E6=8B=A9=20tray=20=E6=8C=82=E8=BD=BD=E7=9A=84=E5=B1=8F?= =?UTF-8?q?=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/zdwm/bar.h | 2 ++ src/runtime/runtime.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/zdwm/bar.h b/include/zdwm/bar.h index 0d00e7d..449c7c3 100644 --- a/include/zdwm/bar.h +++ b/include/zdwm/bar.h @@ -39,6 +39,8 @@ typedef struct zdwm_bar_config_t { const char *binding_mode_bg; const char *binding_mode_fg; + int32_t tray_output_index; + uint32_t window_padding_x; const char *window_bg; const char *window_fg; diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 40d272b..8d431c2 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -120,8 +120,9 @@ static void runtime_init_bar(runtime_t *runtime) { .height = bar_height, }; auto color = bar->palette.bg.argb; + bool enable_tray = (int32_t)i == bar->config.tray_output_index; auto bar_window = - backend_create_bar_window(backend, bar_rect, color, false); + backend_create_bar_window(backend, bar_rect, color, enable_tray); bar->tray = bar_window.tray; auto bar_output = &bar->bars[i]; bar_output->cr = bar_window.cr;