dix: clip absolute axes depending on their mode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
Peter Hutterer 2010-10-22 14:02:17 +10:00
parent ea567b675f
commit b5ef88c911

View File

@ -767,9 +767,11 @@ moveRelative(DeviceIntPtr dev, int *x, int *y, ValuatorMask *mask)
/* if attached, clip both x and y to the defined limits (usually
* co-ord space limit). If it is attached, we need x/y to go over the
* limits to be able to change screens. */
if(dev->u.master && dev->valuator->mode == Absolute) {
clipAxis(dev, 0, x);
clipAxis(dev, 1, y);
if(dev->u.master) {
if (valuator_get_mode(dev, 0) == Absolute)
clipAxis(dev, 0, x);
if (valuator_get_mode(dev, 1) == Absolute)
clipAxis(dev, 1, y);
}
/* calc other axes, clip, drop back into valuators */