mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-24 03:45:57 +01:00
snap: account for position of multiple monitors (#8543)
This commit is contained in:
parent
65f66dcf0d
commit
54f57797e9
1 changed files with 2 additions and 2 deletions
|
@ -484,8 +484,8 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
|
||||||
const double BORDERDIFF = DRAGGINGBORDERSIZE - BORDERSIZE;
|
const double BORDERDIFF = DRAGGINGBORDERSIZE - BORDERSIZE;
|
||||||
const auto MON = DRAGGINGWINDOW->m_pMonitor.lock();
|
const auto MON = DRAGGINGWINDOW->m_pMonitor.lock();
|
||||||
|
|
||||||
SRange monX = {MON->vecPosition.x + BORDERSIZE, MON->vecSize.x - BORDERSIZE};
|
SRange monX = {MON->vecPosition.x + BORDERSIZE, MON->vecPosition.x + MON->vecSize.x - BORDERSIZE};
|
||||||
SRange monY = {MON->vecPosition.y + BORDERSIZE, MON->vecSize.y - 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)) {
|
if (canSnap(sourceX.start, monX.start, GAPSIZE) || canSnap(sourceX.start, (monX.start += MON->vecReservedTopLeft.x + BORDERDIFF), GAPSIZE)) {
|
||||||
SNAP(sourceX.start, sourceX.end, monX.start);
|
SNAP(sourceX.start, sourceX.end, monX.start);
|
||||||
|
|
Loading…
Reference in a new issue