From cbadf3e3f31ab5ad5d192daac5f2ca930d08b8fb Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Sun, 4 Feb 2024 15:40:20 +0000 Subject: input: focus window on mouse down on decoration (#4514) Also unifies vectorToWindow funcs --- src/SharedDefs.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/SharedDefs.hpp') diff --git a/src/SharedDefs.hpp b/src/SharedDefs.hpp index da7f6938..3dfb272a 100644 --- a/src/SharedDefs.hpp +++ b/src/SharedDefs.hpp @@ -52,4 +52,9 @@ struct SWindowDecorationExtents { bool operator==(const SWindowDecorationExtents& other) const { return topLeft == other.topLeft && bottomRight == other.bottomRight; } -}; \ No newline at end of file + + void addExtents(const SWindowDecorationExtents& other) { + topLeft = topLeft.getComponentMax(other.topLeft); + bottomRight = bottomRight.getComponentMax(other.bottomRight); + } +}; -- cgit v1.2.3