aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMike Will <[email protected]>2024-11-23 09:36:28 -0500
committerGitHub <[email protected]>2024-11-23 14:36:28 +0000
commit54f57797e9d025db72777ccf4adb0ddb25125016 (patch)
treed8e008bf65f078d63975437abfea77efe127f35b
parent65f66dcf0d38533a383212ca440fdea0163be276 (diff)
downloadHyprland-54f57797e9d025db72777ccf4adb0ddb25125016.tar.gz
Hyprland-54f57797e9d025db72777ccf4adb0ddb25125016.zip
snap: account for position of multiple monitors (#8543)
-rw-r--r--src/layout/IHyprLayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 22e1d947..8ff55d10 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -484,8 +484,8 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
const double BORDERDIFF = DRAGGINGBORDERSIZE - BORDERSIZE;
const auto MON = DRAGGINGWINDOW->m_pMonitor.lock();
- SRange monX = {MON->vecPosition.x + BORDERSIZE, MON->vecSize.x - BORDERSIZE};
- SRange monY = {MON->vecPosition.y + BORDERSIZE, MON->vecSize.y - BORDERSIZE};
+ SRange monX = {MON->vecPosition.x + BORDERSIZE, MON->vecPosition.x + MON->vecSize.x - BORDERSIZE};
+ SRange monY = {MON->vecPosition.y + BORDERSIZE, MON->vecPosition.y + MON->vecSize.y - BORDERSIZE};
if (canSnap(sourceX.start, monX.start, GAPSIZE) || canSnap(sourceX.start, (monX.start += MON->vecReservedTopLeft.x + BORDERDIFF), GAPSIZE)) {
SNAP(sourceX.start, sourceX.end, monX.start);