Skip to content

Commit

Permalink
snap: account for position of multiple monitors (#8543)
Browse files Browse the repository at this point in the history
  • Loading branch information
myQwil authored Nov 23, 2024
1 parent 65f66dc commit 54f5779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layout/IHyprLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 54f5779

Please sign in to comment.