mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
util/box: simplify empty box case in wlr_box_intersection()
This commit is contained in:
parent
d495fb8c04
commit
5d67bbde86
1 changed files with 1 additions and 4 deletions
|
@ -43,10 +43,7 @@ bool wlr_box_intersection(struct wlr_box *dest, const struct wlr_box *box_a,
|
||||||
bool b_empty = wlr_box_empty(box_b);
|
bool b_empty = wlr_box_empty(box_b);
|
||||||
|
|
||||||
if (a_empty || b_empty) {
|
if (a_empty || b_empty) {
|
||||||
dest->x = 0;
|
*dest = (struct wlr_box){0};
|
||||||
dest->y = 0;
|
|
||||||
dest->width = -100;
|
|
||||||
dest->height = -100;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue