diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-09-29 10:54:50 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-09-29 10:54:50 -0700 |
commit | d20be3112770c9fd252c91306675717dcb59e28f (patch) | |
tree | 91e41d2ff8e9bb82363eb0faeace9218263beede /sys/cmd/wm/util.c | |
parent | 88b8c199e3524b7c4e2667db3683c77d70f34a26 (diff) |
chore(wm): add forgotten files
Diffstat (limited to 'sys/cmd/wm/util.c')
-rw-r--r-- | sys/cmd/wm/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/cmd/wm/util.c b/sys/cmd/wm/util.c new file mode 100644 index 0000000..28b0e54 --- /dev/null +++ b/sys/cmd/wm/util.c @@ -0,0 +1,10 @@ +#include "wm.h" + +void +scale_box(struct wlr_box *box, float scale) +{ + box->width = ROUND((box->x + box->width) * scale) - ROUND(box->x * scale); + box->height = ROUND((box->y + box->height) * scale) - ROUND(box->y * scale); + box->x = ROUND(box->x * scale); + box->y = ROUND(box->y * scale); +} |