diff options
author | vaxerski <[email protected]> | 2023-09-10 20:19:06 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-09-10 20:19:09 +0100 |
commit | 0d53401217b79a9dd552f84ce5d3f8b2985641ee (patch) | |
tree | 9dfac236ef345723b11ede2319636a62d418ff8c | |
parent | 1e608029686e961cb64c7aeae24b14e0112f4860 (diff) | |
download | Hyprland-0d53401217b79a9dd552f84ce5d3f8b2985641ee.tar.gz Hyprland-0d53401217b79a9dd552f84ce5d3f8b2985641ee.zip |
xwayland: adjust coord calculation
coord exactly at the corner would be calc'd wrong
-rw-r--r-- | src/managers/XWaylandManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index ee144f31..39331e9c 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -320,7 +320,7 @@ Vector2D CHyprXWaylandManager::xwaylandToWaylandCoords(const Vector2D& coord) { const auto SIZ = *PXWLFORCESCALEZERO ? m->vecTransformedSize : m->vecSize; double distance = - vecToRectDistanceSquared(coord, {m->vecXWaylandPosition.x, m->vecXWaylandPosition.y}, {m->vecXWaylandPosition.x + SIZ.x, m->vecXWaylandPosition.y + SIZ.y}); + vecToRectDistanceSquared(coord, {m->vecXWaylandPosition.x, m->vecXWaylandPosition.y}, {m->vecXWaylandPosition.x + SIZ.x - 1, m->vecXWaylandPosition.y + SIZ.y - 1}); if (distance < bestDistance) { bestDistance = distance; |