mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-18 06:59:53 -05:00
opt: avoid apply border to zero clipbox
This commit is contained in:
parent
9ab3e1a8c4
commit
7acc4b5d85
1 changed files with 3 additions and 0 deletions
3
maomao.c
3
maomao.c
|
|
@ -966,6 +966,9 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx,
|
|||
if (c->iskilling || !client_surface(c)->mapped)
|
||||
return;
|
||||
|
||||
if(clip_box.width <= 0 || clip_box.height <= 0)
|
||||
return;
|
||||
|
||||
wlr_scene_node_set_position(&c->scene_surface->node, c->bw, c->bw);
|
||||
wlr_scene_rect_set_size(c->border[0], clip_box.width, c->bw);
|
||||
wlr_scene_rect_set_size(c->border[1], clip_box.width, c->bw);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue