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:
Peter Hutterer
2008-10-24 13:09:46 +10:30
parent 4e86393bc0
commit 4fb97edcd4

View File

@@ -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);
}