From fdc22449d6f7ac38388812d7f0da7c93e110d28a Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 20 Sep 2021 17:51:31 +0200 Subject: util/box: introduce wlr_fbox_empty Same as wlr_box_empty, but for wlr_fbox. --- util/box.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util') diff --git a/util/box.c b/util/box.c index 93b54e31..a9edc144 100644 --- a/util/box.c +++ b/util/box.c @@ -120,6 +120,10 @@ void wlr_box_transform(struct wlr_box *dest, const struct wlr_box *box, } } +bool wlr_fbox_empty(const struct wlr_fbox *box) { + return box == NULL || box->width <= 0 || box->height <= 0; +} + void wlr_fbox_transform(struct wlr_fbox *dest, const struct wlr_fbox *box, enum wl_output_transform transform, double width, double height) { struct wlr_fbox src = *box; -- cgit v1.2.3