The pad doesn't actually send events on the third axis, it simply acts as a filler so that client's don't misinterpret the actual axis the device has. Initialize it as relative axis, because the rest of the pad is relative too.
Signed-off-by: Peter Hutterer <[email protected]> --- src/xf86Wacom.c | 30 +++++++++++++++++++++++------- 1 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c index 5f02f6d..d4cdae8 100644 --- a/src/xf86Wacom.c +++ b/src/xf86Wacom.c @@ -520,18 +520,34 @@ static int wcmDevInit(DeviceIntPtr pWcm) /* Rotation rotates the Max X and Y */ wcmRotateTablet(pInfo, common->wcmRotate); - } - /* pressure normalized to FILTER_PRESSURE_RES */ - InitValuatorAxisStruct(pInfo->dev, 2, + /* pressure normalized to FILTER_PRESSURE_RES */ + InitValuatorAxisStruct(pInfo->dev, 2, #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 - XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE), + XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE), #endif - 0, FILTER_PRESSURE_RES, 1, 1, 1 + 0, FILTER_PRESSURE_RES, 1, 1, 1 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 - , Absolute + , Absolute #endif - ); + ); + + } else { + /* The pad doesn't have a pressure axis, so initialise third + * axis as unknown relative axis on the pad. This way, we + * can leave the strip/abswheel axes on later axes and don't + * run the danger of clients misinterpreting the axis info + */ + InitValuatorAxisStruct(pInfo->dev, 2, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + None, +#endif + -1, -1, 0, -1, -1 +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 + , Relative +#endif + ); + } if (IsCursor(priv)) { -- 1.7.3.3 ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
