mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 09:49:47 +01:00
xwayland: adjust coord calculation
coord exactly at the corner would be calc'd wrong
This commit is contained in:
parent
1e60802968
commit
0d53401217
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue