fix(wayland): Corrects the cursor coordinates mapping at primary desktop
Remapping the cursor coordinates to the portal edge size makes the mouse position being relative to the edge size, in a multi-monitor environment this edge can be in only one of the monitors and the cursor coordinates got wrong. This changes uses the full height and the full width of the combined monitors to set the mouse cursor position, cropped by the portal edge size.
This commit is contained in:
parent
40f743fb37
commit
0d21f54cb2
1 changed files with 2 additions and 2 deletions
|
|
@ -481,8 +481,8 @@ std::pair<double, double> PortalInputCapture::mapPortalReleasePosition(double x,
|
||||||
return {x, y};
|
return {x, y};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto mappedX = scaleCoordinateBetweenRanges(x, screenLeft, screenRight, portalBounds.left, portalBounds.right);
|
auto mappedX = static_cast<std::int32_t>(std::lround(x));
|
||||||
auto mappedY = scaleCoordinateBetweenRanges(y, screenTop, screenBottom, portalBounds.top, portalBounds.bottom);
|
auto mappedY = static_cast<std::int32_t>(std::lround(y));
|
||||||
|
|
||||||
if (BarrierInfo releaseBarrier;
|
if (BarrierInfo releaseBarrier;
|
||||||
getClosestReleaseBarrier(x, y, screenLeft, screenTop, screenRight, screenBottom, portalBounds, releaseBarrier)) {
|
getClosestReleaseBarrier(x, y, screenLeft, screenTop, screenRight, screenBottom, portalBounds, releaseBarrier)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue