mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-30 13:14:45 -04:00
fix: groupbar hide judgement
This commit is contained in:
parent
e914d76acd
commit
53c634dcb4
4 changed files with 13 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue