mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-25 10:19:22 +00:00
Fix axis inversion for absolute coordinates.
If min_x/y was not equal to 0, the inverted calculated range was off and leads
to inaccessible or out-of-range areas.
(cherry picked from commit 12498042fc)
This commit is contained in:
@@ -388,9 +388,9 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
abs_x = pEvdev->abs_x;
|
||||
abs_y = pEvdev->abs_y;
|
||||
if (pEvdev->invert_x)
|
||||
abs_x = pEvdev->max_x - abs_x;
|
||||
abs_x = pEvdev->max_x - (abs_x - pEvdev->min_x);
|
||||
if (pEvdev->invert_y)
|
||||
abs_y = pEvdev->max_y - abs_y;
|
||||
abs_y = pEvdev->max_y - (abs_y - pEvdev->min_y);
|
||||
|
||||
xf86PostMotionEvent(pInfo->dev, TRUE, 0, 2, abs_x, abs_y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user