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))
|
if (!ISFAKETILED(c))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (c->isfullscreen && c->group_bar) {
|
if (!c->mon->isoverview && !c->isfullscreen &&
|
||||||
wlr_scene_node_set_enabled(&c->group_bar->scene_buffer->node, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!c->mon->isoverview && c->group_bar && !c->isfullscreen &&
|
|
||||||
(c->group_next || c->group_prev)) {
|
(c->group_next || c->group_prev)) {
|
||||||
geo.y = geo.y + config.group_bar_height;
|
geo.y = geo.y + config.group_bar_height;
|
||||||
geo.height -= 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;
|
Client *cur = head;
|
||||||
while (cur) {
|
while (cur) {
|
||||||
if (!c->mon->isoverview && cur->group_bar &&
|
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) {
|
ISNORMAL(c) && !c->isfullscreen) {
|
||||||
wlr_scene_node_set_enabled(&cur->group_bar->scene_buffer->node,
|
wlr_scene_node_set_enabled(&cur->group_bar->scene_buffer->node,
|
||||||
true);
|
true);
|
||||||
|
|
|
||||||
|
|
@ -417,12 +417,15 @@ void client_draw_title(Client *c) {
|
||||||
if (!c || !c->group_bar)
|
if (!c || !c->group_bar)
|
||||||
return;
|
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) {
|
c->group_bar->scene_buffer->node.enabled) {
|
||||||
wlr_scene_node_set_enabled(&c->group_bar->scene_buffer->node, false);
|
wlr_scene_node_set_enabled(&c->group_bar->scene_buffer->node, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c->is_logic_hide)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!c->group_next && !c->group_prev)
|
if (!c->group_next && !c->group_prev)
|
||||||
return;
|
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)
|
if (!c->group_bar)
|
||||||
return;
|
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);
|
wlr_scene_node_set_position(&c->group_bar->scene_buffer->node, x, y);
|
||||||
mango_group_bar_set_size(c->group_bar, width, height);
|
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);
|
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);
|
client_check_tab_node_visible(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,10 @@
|
||||||
((C) && (M) && (C)->mon == (M) && !(C)->is_logic_hide && \
|
((C) && (M) && (C)->mon == (M) && !(C)->is_logic_hide && \
|
||||||
(((C)->tags & (M)->tagset[(M)->seltags] || (C)->isglobal || \
|
(((C)->tags & (M)->tagset[(M)->seltags] || (C)->isglobal || \
|
||||||
(C)->isunglobal)))
|
(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 LENGTH(X) (sizeof X / sizeof X[0])
|
||||||
#define END(A) ((A) + LENGTH(A))
|
#define END(A) ((A) + LENGTH(A))
|
||||||
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
#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.width = c->mon->w.width - 2 * config.gappoh;
|
||||||
geom.height = c->mon->w.height - 2 * config.gappov;
|
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.height -= config.group_bar_height;
|
||||||
geom.y += 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.width = c->mon->w.width - 2 * config.gappoh;
|
||||||
maximizescreen_box.height = c->mon->w.height - 2 * config.gappov;
|
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.height -= config.group_bar_height;
|
||||||
maximizescreen_box.y += config.group_bar_height;
|
maximizescreen_box.y += config.group_bar_height;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue