diff options
author | Simon Ser <contact@emersion.fr> | 2021-09-20 17:51:31 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-09-22 10:45:39 -0600 |
commit | fdc22449d6f7ac38388812d7f0da7c93e110d28a (patch) | |
tree | 91a5b8336fccd1a4ddb6d202503a444d98ce8b3d /util | |
parent | 7939bf8cc6b81d5bbd11da08b905eea1bba81ce3 (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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |