When touchpad is in Relative mode of operation, we need allow driver update internal old{x,y,z} variables to eliminate cursor jump after gesture ended. That update performed in wcmSendEvents() function in wcmCommon.c. So, when we in relative mode, allow call wcmSendEvents() to update variables, but don't allow actual events sending to X server.
Signed-off-by: Alexey Osipov <si...@lerlan.ru> --- src/wcmCommon.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index e85c6d8..d0bff63 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -743,10 +743,13 @@ void wcmSendEvents(InputInfoPtr pInfo, const WacomDeviceState* ds) valuators[4] = v4; valuators[5] = v5; - if (type == PAD_ID) - wcmSendPadEvents(pInfo, ds, 3, 3, &valuators[3]); /* pad doesn't post x/y/z */ - else - wcmSendNonPadEvents(pInfo, ds, 0, priv->naxes, valuators); + /* don't move the cursor if in gesture mode */ + if (!(!is_absolute(pInfo) && priv->common->wcmGestureMode)) { + if (type == PAD_ID) + wcmSendPadEvents(pInfo, ds, 3, 3, &valuators[3]); /* pad doesn't post x/y/z */ + else + wcmSendNonPadEvents(pInfo, ds, 0, priv->naxes, valuators); + } priv->oldProximity = ds->proximity; if (ds->proximity) @@ -943,7 +946,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel, wcmGestureFilter(priv, channel); /* don't move the cursor if in gesture mode */ - if (common->wcmGestureMode) + if ((priv->flags & ABSOLUTE_FLAG) && (common->wcmGestureMode)) return; /* For touch, only first finger moves the cursor */ -- 1.7.0.4 ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel