util/box: introduce wlr_fbox_contains_box

Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
This commit is contained in:
Loukas Agorgianitis 2025-04-14 11:42:06 +02:00
parent 72c31255c3
commit 3f5d8e1d48
No known key found for this signature in database
GPG key ID: DDC6FA7D5BB332E6
2 changed files with 19 additions and 0 deletions

View file

@ -87,6 +87,14 @@ bool wlr_box_contains_point(const struct wlr_box *box, double x, double y);
*/
bool wlr_box_contains_box(const struct wlr_box *bigger, const struct wlr_box *smaller);
/**
* Verifies that a box is fully contained within another box.
*
* Returns true if the "smaller" box is fully contained within the "bigger" box.
* If either of the boxes are empty, false is returned.
*/
bool wlr_fbox_contains_box(const struct wlr_fbox *bigger, const struct wlr_fbox *smaller);
/**
* Checks whether a box is empty or not.
*