Comments

Jin, Gordon gordon.jin at intel.com
Thu Jul 27 06:39:33 EEST 2006


Geoff Clare wrote:
> Alan Coopersmith <alan.coopersmith at sun.com> wrote, on 11 Jul 2006:
>> 
>> Stuart Anderson wrote:
>>> 
>>> https://bugs.freedesktop.org/show_bug.cgi?id=7428
>>> 
>>> Does anyone remember off the top of their head if the protocol
>>> specifies only 5 buttons? If so, instead of just making the simple
>>> change as in the patch attached to this bug, would we issue a
>>> warning of some sort if there are more than 5 buttons?
>> 
>> From looking at the protocol, ButtonMotion events are limited to the
>> first 5 buttons, as are the masks used in QueryPointer and in the
>> modifier state field of events,
> 
> I would guess that these limits are the reason the test code has an
> assumption that there would never be more than 5 buttons. 
> 
>> but no limit is stated beyond the size of a button number being a
>> CARD8 for the button numbers that can be used in GetPointerMapping &
>> SetPointerMapping requests, and ButtonPress/ButtonRelease events.
> 
> I agree there is no reason for the XSetPointerMapping test code to
> assume a limit of 5 buttons. 
> 
> Rather than just increasing MAXBUTTONS as proposed in the patch, I
> would suggest removing it altogether.  I.e. delete the #define (and
> preceding comment) and the two lines:  
> 
> 		if (map[i] > MAXBUTTON)
> 			map[i] = 1;

To follow up the resolution, I submit a new patch to the bugzilla:
https://bugs.freedesktop.org/attachment.cgi?id=6358
Please review.

Regards
Gordon



More information about the xorg-test mailing list