aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
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;