diff --git a/src/lib/platform/PortalInputCapture.cpp b/src/lib/platform/PortalInputCapture.cpp index 554655600..adcc873f8 100644 --- a/src/lib/platform/PortalInputCapture.cpp +++ b/src/lib/platform/PortalInputCapture.cpp @@ -481,8 +481,8 @@ std::pair PortalInputCapture::mapPortalReleasePosition(double x, return {x, y}; } - auto mappedX = scaleCoordinateBetweenRanges(x, screenLeft, screenRight, portalBounds.left, portalBounds.right); - auto mappedY = scaleCoordinateBetweenRanges(y, screenTop, screenBottom, portalBounds.top, portalBounds.bottom); + auto mappedX = static_cast(std::lround(x)); + auto mappedY = static_cast(std::lround(y)); if (BarrierInfo releaseBarrier; getClosestReleaseBarrier(x, y, screenLeft, screenTop, screenRight, screenBottom, portalBounds, releaseBarrier)) {