mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-27 16:39:06 +00:00
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:
committed by
Peter Hutterer
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 */
|
||||
{
|
||||
|
||||
valuators[0] = rescaleValuatorAxis(valuators[0], NULL,
|
||||
pDev->valuator->axes + 0,
|
||||
scr->width);
|
||||
if (num_valuators > 1)
|
||||
valuators[1] = rescaleValuatorAxis(valuators[1], NULL,
|
||||
if (num_valuators >= 1 && first_valuator == 0)
|
||||
valuators[0] = rescaleValuatorAxis(valuators[0], NULL,
|
||||
pDev->valuator->axes + 0,
|
||||
scr->width);
|
||||
if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
|
||||
valuators[1 - first_valuator] = rescaleValuatorAxis(valuators[1 - first_valuator], NULL,
|
||||
pDev->valuator->axes + 1,
|
||||
scr->height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user