pointerinput: improve pointer confinement

This changes how the pointer is confined to screens - instead of just finding the closest screen of the potential future position and confining the pointer to that, trace the pointer movement up to the closest screen edge. When the screen edge is hit, we apply the normal edge barrier logic and if the pointer crosses the barrier, we move it to the next screen.

The important bit there is that the pointer is moved to the next screen whether or not the actual movement would cross the same distance. This is necessary because the pointer coordinate grid has gaps between screens, especially with fractional scaling, but also without, as the pointer is confined to [x, x + width - 1], but the next screen starts at x + width.

With low movement speeds or high DPI mice, that gap between screens may never be skipped by a single pointer event, making it seem like there is an additional barrier between screens.

BUG: 489657

Edited by Xaver Hugl

Merge request reports

Loading