On Wed, 2010-07-28 at 14:55 +1000, Peter Hutterer wrote:
> On Fri, Jul 16, 2010 at 09:21:19AM -0400, Chase Douglas wrote:
> > @@ -309,6 +315,12 @@ countValuators(DeviceEvent *ev, int *first)
> >  
> >      for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++)
> >      {
> > +        /* Assume mode of 0th valuator matches XI1 device mode. Stop when 
> > the
> > +         * event mode changes since XI1 can't handle mixed mode devices.
> > +         */
> 
> why is this assumption necessary? valuator->mode still stores what the XI1
> device mode is.
> 
> > +        if (ev->valuators.mode[i] != ev->valuators.mode[0])
> > +            break;
> > +
> >          if (BitIsOn(ev->valuators.mask, i))
> >          {
> >              if (first_valuator == -1)

In this function we no longer have a pointer to the input device. The
closest thing we have is ev->deviceid, which then we could use to loop
over inputInfo.devices to find the device and then figure out what its
XI1 device mode is. That just seems like a lot of work when we have the
value there in the event itself.

That said, I'm fine with implementing the approach above if that's what
you think is best.

Thanks,

-- Chase

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to