mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-24 06:59:54 -05:00
opt: optimize border clip
This commit is contained in:
parent
240b0a19b8
commit
ac06fa2310
1 changed files with 4 additions and 4 deletions
8
maomao.c
8
maomao.c
|
|
@ -1006,15 +1006,15 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx,
|
|||
|
||||
if (ISTILED(c) || c->animation.tagining || c->animation.tagouted || c->animation.tagouting) {
|
||||
if (c->animation.current.x < c->mon->m.x) {
|
||||
set_rect_size(c->border[2], 0, 0);
|
||||
set_rect_size(c->border[2], GEZERO(c->bw - offsetx), clip_box.height - 2 * c->bw);
|
||||
} else if (c->animation.current.x + c->animation.current.width >
|
||||
c->mon->m.x + c->mon->m.width) {
|
||||
set_rect_size(c->border[3], 0, 0);
|
||||
set_rect_size(c->border[3], GEZERO(c->bw - offsetx), clip_box.height - 2 * c->bw);
|
||||
} else if (c->animation.current.y < c->mon->m.y) {
|
||||
set_rect_size(c->border[0], 0, 0);
|
||||
set_rect_size(c->border[0], clip_box.width, GEZERO(c->bw - offsety));
|
||||
} else if (c->animation.current.y + c->animation.current.height >
|
||||
c->mon->m.y + c->mon->m.height) {
|
||||
set_rect_size(c->border[1], 0, 0);
|
||||
set_rect_size(c->border[1], clip_box.width, GEZERO(c->bw - offsety));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue