From 4868d4dfd3dca053915ddc3ec6444e7e96ebd8c6 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 16 Nov 2023 17:31:52 +0000 Subject: shadow: avoid fatal mutation of the windowBox for calcs fixes #3865 --- src/helpers/Box.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/helpers/Box.cpp') 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}; } -- cgit v1.2.3