On Tue, Jan 11, 2011 at 5:34 PM, <ch...@cnpbagwell.com> wrote: > From: Chris Bagwell <ch...@cnpbagwell.com> > > ABS_MT_SLOT is normally zero which means it will not be sent > when xf86-input-wacom first starts up normally. During 2 > finger touch, this event will constantly toggle between > slot 0 and 1. > > Move initialization of device_type to ABS_MT_TRACKING_ID > because its more effecient to do it at touch transitions > instead of constantly during 2 touches and also helps > case of initial lost event. > > There is event lost recovery logic elsewhere but it is > mistakenly setting this as a CURSOR device instead of TOUCH > and its being discarded until first 2 finger touch occurs. > > Recent combo of commits caused this discard to start > happening. > > Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingli...@gmail.com> for this one. Thank you, Chris. I have comments for the other ones. Ping > --- > src/wcmUSB.c | 20 +++----------------- > 1 files changed, 3 insertions(+), 17 deletions(-) > > diff --git a/src/wcmUSB.c b/src/wcmUSB.c > index 06c303e..0d21af9 100644 > --- a/src/wcmUSB.c > +++ b/src/wcmUSB.c > @@ -906,28 +906,14 @@ static int usbParseAbsMTEvent(WacomCommonPtr common, > struct input_event *event) > { > case ABS_MT_SLOT: > if (event->value >= 0 && event->value < MAX_FINGERS) > - { > - WacomDeviceState *dsnew; > - > private->wcmMTChannel = event->value; > - dsnew = &common-> > - > wcmChannel[private->wcmMTChannel].work; > - > - /* Set tool specific data here. Since > - * MT slots have fixed mapping to channel, > - * the channel will always have previous > - * tools values. Since MT event filtering > - * is also per slot, this works as expected. > - */ > - dsnew->device_type = TOUCH_ID; > - dsnew->device_id = TOUCH_DEVICE_ID; > - dsnew->serial_num = event->value+1; > - } > break; > > case ABS_MT_TRACKING_ID: > ds->proximity = (event->value != -1); > - > + ds->device_type = TOUCH_ID; > + ds->device_id = TOUCH_DEVICE_ID; > + ds->serial_num = private->wcmMTChannel+1; > ds->sample = (int)GetTimeInMillis(); > break; > > -- > 1.7.3.4 > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Linuxwacom-devel mailing list > Linuxwacom-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel > ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel