[PATCH] wrong num_valuators in dix/getevents.c breaks touchpad

Adam Jackson ajax at redhat.com
Tue Mar 25 09:33:33 PDT 2008


On Tue, 2008-03-25 at 18:25 +0200, Daniel Stone wrote:
> On Tue, Mar 25, 2008 at 05:14:14PM +0100, Sascha Hlusiak wrote:
> > I believe commit 981bb9f1e33e4564d1b59c00c808cc43a2e9497b by Peter sets the 
> > wrong number of valuators:
> > xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i);
> > 
> > It breaks for example when first_valuator is 2 and num_valuators is 1, then 
> > xv->num_valuators becomes 255 (=-1).
> > 
> > This looks better to me:
> > xv->num_valuators = ((final_valuator - i) > 6) ? 6 : (final_valuator - i);
> > 
> > With the patch I can finally run my touchpad with the evdev-1.2 driver without 
> > X crashing with: 
> > "Bad valuators reported for device AlpsPS/2 ALPS GlidePoint (2 + 255 > 3)"
> 
> Yep, this makes sense to me.  Please apply.

Applied, thanks.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20080325/1716182c/attachment.pgp>


More information about the xorg mailing list