Skip to content

core/pointer_input: fix pointer confinement when moving between outputs

Nicolas James requested to merge njahxac/kwin:low_sens_multimonitor_fix into master

Fixes https://bugs.kde.org/show_bug.cgi?id=489657

When using a mouse with high DPI and polling rate (to reduce input latency), the mouse reports movements with extreme granularity. This results in reasonably small floating point values being submitted to kwin, which reveals a bug in multimonitor setups. It seems that the reported movement has to exceed some value (probably exactly 1.0f) before kwin considers it 'moved' to the other monitor. This causes a strange 'barrier' feeling when moving a cursor between monitors - you have to move at a faster speed before you can 'jump over' it. It feels very similar to the 'edge barrier' feature (which obviously is disabled).

The problem is caused by outputAt incorrectly returning just the closest output in a scenario where the pointer lands between the 1.0 distance separating output positions.

Edited by Nicolas James

Merge request reports