aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/SharedDefs.hpp
diff options
context:
space:
mode:
authorMightyPlaza <[email protected]>2024-02-04 15:40:20 +0000
committerGitHub <[email protected]>2024-02-04 15:40:20 +0000
commitcbadf3e3f31ab5ad5d192daac5f2ca930d08b8fb (patch)
tree40fe310e5ffb955a19b32a2c8d234b3bdf9e45cb /src/SharedDefs.hpp
parent1ed4f1cb254ce4b4e55727d972998be1ef4baf22 (diff)
downloadHyprland-cbadf3e3f31ab5ad5d192daac5f2ca930d08b8fb.tar.gz
Hyprland-cbadf3e3f31ab5ad5d192daac5f2ca930d08b8fb.zip
input: focus window on mouse down on decoration (#4514)
Also unifies vectorToWindow funcs
Diffstat (limited to 'src/SharedDefs.hpp')
-rw-r--r--src/SharedDefs.hpp7
1 files changed, 6 insertions, 1 deletions
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);
+ }
+};