summaryrefslogtreecommitdiff
path: root/src/helpers/Box.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-11-16 17:31:52 +0000
committerVaxry <vaxry@vaxry.net>2023-11-16 17:31:52 +0000
commit4868d4dfd3dca053915ddc3ec6444e7e96ebd8c6 (patch)
tree0e89eb97c67867c562e34c25777c5115917ee968 /src/helpers/Box.cpp
parent859841f4d1ceb4060dcfcd2a94976805eaa39d62 (diff)
shadow: avoid fatal mutation of the windowBox for calcs
fixes #3865
Diffstat (limited to 'src/helpers/Box.cpp')
-rw-r--r--src/helpers/Box.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Box.cpp b/src/helpers/Box.cpp
index 29aa81fa..3d57bc79 100644
--- a/src/helpers/Box.cpp
+++ b/src/helpers/Box.cpp
@@ -112,6 +112,10 @@ CBox CBox::roundInternal() {
return CBox{std::floor(x), std::floor(y), std::floor(newW), std::floor(newH)};
}
+CBox CBox::copy() const {
+ return CBox{*this};
+}
+
Vector2D CBox::pos() const {
return {x, y};
}