Only post the valuators we actually have, not fictious x/y valuators. The server will fill those in for us.
Signed-off-by: Peter Hutterer <[email protected]> --- src/wcmCommon.c | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 22a76dd..79caffa 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -744,14 +744,10 @@ void wcmSendEvents(InputInfoPtr pInfo, const WacomDeviceState* ds) } else { - if (v3 || v4 || v5 || buttons || ds->relwheel) - { - x = 0; - y = 0; - } + int valuators[3] = { v3, v4, v5 }; if (!priv->oldProximity && is_proximity) - xf86PostProximityEvent(pInfo->dev, 1, 0, naxes, x, y, z, v3, v4, v5); + xf86PostProximityEventP(pInfo->dev, 1, 3, 3, valuators); if (v3 || v4 || v5 || buttons || ds->relwheel) { @@ -760,11 +756,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const WacomDeviceState* ds) /* xf86PostMotionEvent is only needed to post the valuators * It should NOT move the cursor. */ - if ( v3 || v4 || v5 ) - { - xf86PostMotionEvent(pInfo->dev, is_absolute(pInfo), - 0, naxes, x, y, z, v3, v4, v5); - } + xf86PostMotionEventP(pInfo->dev, is_absolute(pInfo), 3, 3, valuators); } else { @@ -773,7 +765,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const WacomDeviceState* ds) x, y, z, v3, v4, v5); } if (priv->oldProximity && !is_proximity) - xf86PostProximityEvent(pInfo->dev, 0, 0, naxes, x, y, z, v3, v4, v5); + xf86PostProximityEventP(pInfo->dev, 0, 0, 3, valuators); } priv->oldProximity = is_proximity; priv->old_device_id = id; -- 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
