aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-09-20 17:51:31 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-09-22 10:45:39 -0600
commitfdc22449d6f7ac38388812d7f0da7c93e110d28a (patch)
tree91a5b8336fccd1a4ddb6d202503a444d98ce8b3d /util
parent7939bf8cc6b81d5bbd11da08b905eea1bba81ce3 (diff)
util/box: introduce wlr_fbox_empty
Same as wlr_box_empty, but for wlr_fbox.
Diffstat (limited to 'util')
-rw-r--r--util/box.c4
1 files changed, 4 insertions, 0 deletions
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;