opt: reset global window record per when arrange
This commit is contained in:
@@ -430,4 +430,15 @@ float *get_border_color(Client *c) {
|
|||||||
} else {
|
} else {
|
||||||
return bordercolor;
|
return bordercolor;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int is_single_bit_set(uint32_t x) { return x && !(x & (x - 1)); }
|
||||||
|
|
||||||
|
bool client_only_in_one_tag(Client *c) {
|
||||||
|
uint32_t masked = c->tags & TAGMASK;
|
||||||
|
if (is_single_bit_set(masked)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -576,6 +576,23 @@ void reset_size_per_mon(Monitor *m, int tile_cilent_num,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset_multi_tag_client_per(Monitor *m) {
|
||||||
|
Client *c = NULL;
|
||||||
|
wl_list_for_each(c, &clients, link) {
|
||||||
|
|
||||||
|
if (c->isglobal || c->isunglobal) {
|
||||||
|
set_size_per(m, c);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!VISIBLEON(c, m))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!client_only_in_one_tag(c)) {
|
||||||
|
set_size_per(m, c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void // 17
|
void // 17
|
||||||
arrange(Monitor *m, bool want_animation) {
|
arrange(Monitor *m, bool want_animation) {
|
||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
|
|||||||
@@ -5693,6 +5693,7 @@ toggleseltags:
|
|||||||
|
|
||||||
if (changefocus)
|
if (changefocus)
|
||||||
focusclient(focustop(m), 1);
|
focusclient(focustop(m), 1);
|
||||||
|
reset_multi_tag_client_per(m);
|
||||||
arrange(m, want_animation);
|
arrange(m, want_animation);
|
||||||
printstatus();
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user