Commit e9f95de fixed an issue where the pointer would jump around if the kernel's duplicate event filtering had removed the X or Y position from the initial "entering proximity" packet. The fix involved requesting the current axis value from the kernel, but only if we weren't dealing with the pad (since the pad never sends position data, and may not even have those axes). Unfortunately, the check used 'IsPad(priv)', which may return incorrect results at this point in the program flow.* This can cause the pointer jumps to occur anyway if the driver (incorrectly) believes the events to be coming from the pad as described in bug #286.
To fix this, the check is changed to rely on 'ds->device_type' which provides accurate information. *It appears that the 'pInfo' passed into 'usbDispatchEvents' may be of any X device that shares the same underlying kernel device. It is not until later in 'wcmEvent' that we use 'findTool' to find the appropriate device based on the 'ds->device_type'. http://sourceforge.net/p/linuxwacom/bugs/286/ Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> --- src/wcmUSB.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 5ceba95..dcb1690 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1801,10 +1801,10 @@ static void usbDispatchEvents(InputInfoPtr pInfo) } /* verify we have minimal data when entering prox */ - if (ds->proximity && !dslast.proximity) { + if (ds->proximity && !dslast.proximity && ds->device_type != PAD_ID) { struct input_absinfo absinfo; - if (!ds->x && !IsPad(priv)) { + if (!ds->x) { if (ioctl(priv->pInfo->fd, EVIOCGABS(ABS_X), &absinfo) < 0) { DBG(-1, common, "unable to ioctl current x value.\n"); @@ -1812,7 +1812,7 @@ static void usbDispatchEvents(InputInfoPtr pInfo) } ds->x = absinfo.value; } - if (!ds->y && !IsPad(priv)) { + if (!ds->y) { if (ioctl(priv->pInfo->fd, EVIOCGABS(ABS_Y), &absinfo) < 0) { DBG(-1, common, "unable to ioctl current x value.\n"); -- 2.5.0 ------------------------------------------------------------------------------ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel