opt: allow tab height to 0

This commit is contained in:
DreamMaoMao 2026-06-18 23:35:25 +08:00
parent 0cc6badc6d
commit 23a67ba4e6
4 changed files with 29 additions and 15 deletions

View file

@ -289,11 +289,15 @@ void apply_shield(Client *c, struct wlr_box clip_box) {
}
}
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);