opt: optimize groupbar animation clip

This commit is contained in:
DreamMaoMao 2026-06-22 09:37:03 +08:00
parent 06eed8cd2e
commit 230993ba00

View file

@ -441,16 +441,23 @@ void client_draw_title(Client *c) {
int32_t bottom_over = int32_t bottom_over =
tab_y + config.tab_bar_height - c->mon->m.y - c->mon->m.height; tab_y + config.tab_bar_height - c->mon->m.y - c->mon->m.height;
if (top_over > 0) if (c != grabc &&
(ISSCROLLTILED(c) || c->animation.tagining || c->animation.tagouting)) {
if (top_over > 0) {
tab_y = c->mon->m.y;
th = config.tab_bar_height - top_over; th = config.tab_bar_height - top_over;
if (bottom_over > 0) }
if (bottom_over > 0) {
th = th - bottom_over; th = th - bottom_over;
if (right_over > 0) }
if (right_over > 0) {
tw = tw - right_over; tw = tw - right_over;
}
if (left_over > 0) { if (left_over > 0) {
tab_x = c->mon->m.x; tab_x = c->mon->m.x;
tw = tw - left_over; tw = tw - left_over;
} }
}
if (tw <= 0 || th <= 0) { if (tw <= 0 || th <= 0) {
cur = head; cur = head;