diff --git a/dix/getevents.c b/dix/getevents.c index 4e62507aa..71d83c4ba 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -896,9 +896,9 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask, /* scale x&y to desktop coordinates */ *screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL, - screenInfo.x, screenInfo.width); + screenInfo.x, screenInfo.width - 1); *screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL, - screenInfo.y, screenInfo.height); + screenInfo.y, screenInfo.height - 1); *devx = x; *devy = y;