opt: allow tab height to 0
Some checks are pending
Sync website / sync-website (push) Waiting to run
Sync wiki / sync-wiki (push) Waiting to run

This commit is contained in:
DreamMaoMao 2026-06-18 23:35:25 +08:00
parent 727b9fe77e
commit 5583f8901a
4 changed files with 29 additions and 15 deletions

View file

@ -398,11 +398,15 @@ void client_draw_shadow(Client *c) {
wlr_scene_shadow_set_clipped_region(c->shadow, clipped_region);
}
void global_draw_titlebar(Client *c, int32_t x, int32_t y, int32_t width,
int32_t height) {
void global_draw_tab_bar(Client *c, int32_t x, int32_t y, int32_t width,
int32_t height) {
if (!c->tab_bar_node)
return;
if (height <= 0) {
wlr_scene_node_set_enabled(&c->tab_bar_node->scene_buffer->node, false);
}
wlr_scene_node_set_position(&c->tab_bar_node->scene_buffer->node, x, y);
wlr_scene_node_set_enabled(&c->tab_bar_node->scene_buffer->node, true);
mango_tab_bar_node_set_size(c->tab_bar_node, width, height);