feat(bar): 新增 tray_output_index 配置用于选择 tray 挂载的屏幕

This commit is contained in:
2026-07-18 18:31:31 +08:00
parent 3d258bdc8b
commit 31cd35bf84
2 changed files with 4 additions and 1 deletions

View File

@@ -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;