summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-30 20:02:04 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-30 20:02:04 +0200
commit4510764f348d1a7c4cca613925ee22acfa38b388 (patch)
tree25863cd5a95145f8db17bf5f9ea957b3a443e3e9 /src/helpers/MiscFunctions.cpp
parent96a23eca8168739fd27e14c2b0236a368572535a (diff)
finally fix scaled snapshots
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 067a351f..cb1d88d6 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -114,8 +114,8 @@ std::string getFormat(const char *fmt, ...) {
}
void scaleBox(wlr_box* box, float scale) {
- box->width = std::round((box->x + box->width) * scale) - std::round(box->x * scale);
- box->height = std::round((box->y + box->height) * scale) - std::round(box->y * scale);
+ box->width = std::round(box->width * scale);
+ box->height = std::round(box->height * scale);
box->x = std::round(box->x * scale);
box->y = std::round(box->y * scale);
}