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

Daniel Stone daniel at fooishbar.org
Tue Mar 25 09:25:04 PDT 2008


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.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080325/187980f9/attachment.pgp>


More information about the xorg mailing list