On Sat, Dec 31, 2011 at 1:58 AM, Alexey Osipov <[email protected]> wrote: > В Птн, 30/12/2011 в 13:30 -0600, Chris Bagwell пишет: >> The need for this makes sense (although I haven't tested it to much to >> see the jump). >> >> Although absolute devices don't have the same delta issue, I think its >> better to use same code flow in both cases. So I'd totally delete the >> original "if (wcmGestureMode) return;" and add the single if() inside >> wcmSendEvents(). > > Just tried to do what you have suggested. In that case we have broken > (in same way) Absolute mode for touch device. E.g. cursor jumps to wrong > position just after any gesture has been used, but for Absolute mode.
Really? Oh well. I would really like to keep the gesture specific logic close together in wcmCommon.c so we don't have to dig around so hard for differences or introduce unneeded behaviour differences between modes. How about we move the original if() to top of wcmSendEvents() instead of wcEvents()? I think thats still early enough to prevent a jump. Chris > >> I'd also limit the wcmGestureMode to wcmSendNonPadEvents() since PAD >> devices never have gestures. > > Look reasonable. If no more comments on this patch, I'll repost a new > version with this only modification soon. > >> >> Chris >> >> On Sat, Dec 24, 2011 at 12:18 AM, Alexey Osipov <[email protected]> wrote: >> > 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 <[email protected]> >> > --- >> > 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 >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel > > ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
