diff --git a/src/action/client.h b/src/action/client.h index dce78d1e..b4eaaf27 100644 --- a/src/action/client.h +++ b/src/action/client.h @@ -57,11 +57,7 @@ void client_tile_resize(Client *c, struct wlr_box geo, int32_t interact) { if (!ISFAKETILED(c)) return; - if (c->isfullscreen && c->group_bar) { - wlr_scene_node_set_enabled(&c->group_bar->scene_buffer->node, false); - } - - if (!c->mon->isoverview && c->group_bar && !c->isfullscreen && + if (!c->mon->isoverview && !c->isfullscreen && (c->group_next || c->group_prev)) { geo.y = geo.y + config.group_bar_height; geo.height -= config.group_bar_height; @@ -189,7 +185,7 @@ void client_check_tab_node_visible(Client *c) { Client *cur = head; while (cur) { if (!c->mon->isoverview && cur->group_bar && - (cur->group_next || cur->group_prev) && VISIBLEON(c, c->mon) && + (cur->group_next || cur->group_prev) && TAGMATCH(c, c->mon) && ISNORMAL(c) && !c->isfullscreen) { wlr_scene_node_set_enabled(&cur->group_bar->scene_buffer->node, true); diff --git a/src/animation/client.h b/src/animation/client.h index 937ce3b6..ef75ca68 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -417,12 +417,15 @@ void client_draw_title(Client *c) { if (!c || !c->group_bar) return; - if (!c->group_next && !c->group_prev && c->group_bar && + if (!c->group_next && !c->group_prev && c->group_bar->scene_buffer->node.enabled) { wlr_scene_node_set_enabled(&c->group_bar->scene_buffer->node, false); return; } + if (c->is_logic_hide) + return; + if (!c->group_next && !c->group_prev) return; @@ -555,10 +558,6 @@ void global_draw_group_bar(Client *c, int32_t x, int32_t y, int32_t width, if (!c->group_bar) return; - if (height <= 0) { - wlr_scene_node_set_enabled(&c->group_bar->scene_buffer->node, false); - } - wlr_scene_node_set_position(&c->group_bar->scene_buffer->node, x, y); mango_group_bar_set_size(c->group_bar, width, height); } diff --git a/src/layout/arrange.h b/src/layout/arrange.h index 803970da..7f41f378 100644 --- a/src/layout/arrange.h +++ b/src/layout/arrange.h @@ -1132,7 +1132,7 @@ void pre_caculate_before_arrange(Monitor *m, bool want_animation, client_add_jump_label_node(c); } - if (c->group_bar && c->group_bar->scene_buffer->node.enabled) { + if (c->group_bar->scene_buffer->node.enabled) { client_check_tab_node_visible(c); } diff --git a/src/mango.c b/src/mango.c index 12511672..4d1363d0 100644 --- a/src/mango.c +++ b/src/mango.c @@ -129,6 +129,10 @@ ((C) && (M) && (C)->mon == (M) && !(C)->is_logic_hide && \ (((C)->tags & (M)->tagset[(M)->seltags] || (C)->isglobal || \ (C)->isunglobal))) + +#define TAGMATCH(C, M) \ + ((C) && (M) && (C)->mon == (M) && (((C)->tags & (M)->tagset[(M)->seltags]))) + #define LENGTH(X) (sizeof X / sizeof X[0]) #define END(A) ((A) + LENGTH(A)) #define TAGMASK ((1 << LENGTH(tags)) - 1) @@ -5731,7 +5735,7 @@ void reset_maximizescreen_size(Client *c) { geom.width = c->mon->w.width - 2 * config.gappoh; geom.height = c->mon->w.height - 2 * config.gappov; - if ((c->group_next || c->group_prev) && c->group_bar) { + if (c->group_next || c->group_prev) { geom.height -= config.group_bar_height; geom.y += config.group_bar_height; } @@ -5778,7 +5782,7 @@ void setmaximizescreen(Client *c, int32_t maximizescreen, bool rearrange) { maximizescreen_box.width = c->mon->w.width - 2 * config.gappoh; maximizescreen_box.height = c->mon->w.height - 2 * config.gappov; - if ((c->group_next || c->group_prev) && c->group_bar) { + if (c->group_next || c->group_prev) { maximizescreen_box.height -= config.group_bar_height; maximizescreen_box.y += config.group_bar_height; }