dix: deal with first_valuator > 0 correctly if POINTER_SCREEN is set
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
21cbb4c9de
commit
94cdc1ef0a
|
@ -1050,11 +1050,12 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
if (flags & POINTER_SCREEN) /* valuators are in screen coords */
|
if (flags & POINTER_SCREEN) /* valuators are in screen coords */
|
||||||
{
|
{
|
||||||
|
|
||||||
valuators[0] = rescaleValuatorAxis(valuators[0], NULL,
|
if (num_valuators >= 1 && first_valuator == 0)
|
||||||
pDev->valuator->axes + 0,
|
valuators[0] = rescaleValuatorAxis(valuators[0], NULL,
|
||||||
scr->width);
|
pDev->valuator->axes + 0,
|
||||||
if (num_valuators > 1)
|
scr->width);
|
||||||
valuators[1] = rescaleValuatorAxis(valuators[1], NULL,
|
if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
|
||||||
|
valuators[1 - first_valuator] = rescaleValuatorAxis(valuators[1 - first_valuator], NULL,
|
||||||
pDev->valuator->axes + 1,
|
pDev->valuator->axes + 1,
|
||||||
scr->height);
|
scr->height);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue