mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
fix: crash when clipbox width or height less than zero
This commit is contained in:
parent
28bbe5b225
commit
d86301d713
1 changed files with 3 additions and 0 deletions
3
maomao.c
3
maomao.c
|
|
@ -1025,6 +1025,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