[PATCH 12/15] Clarify rep_buttons assignment

Daniel Stone daniel at fooishbar.org
Tue Jun 14 09:28:59 PDT 2011


Hi,

On Tue, Jun 14, 2011 at 03:32:27PM +1000, Peter Hutterer wrote:
> On Thu, Jun 09, 2011 at 08:57:33PM +0100, Daniel Stone wrote:
> > +    if (para->updown_button_repeat)
> > +        rep_buttons |= (1 << (4 - 1) | (1 << 5 - 1));
> > +    if (para->leftright_button_repeat)
> > +        rep_buttons |= (1 << (6 - 1) | (1 << 7 - 1));
> 
> The original version had the advantage of being correct though ;)
> 
>   rep_buttons |= (1 << (4 - 1)) | (1 << (5 - 1));
>   rep_buttons |= (1 << (6 - 1)) | (1 << (7 - 1));

Guffaw, thanks.  Incidentally, I broke this while fixing indentation ...

> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> with this change
> 
> I do have to wonder if this part has seen any testing given that you'd
> always set buttons with this code. but then again, I guess none of us still
> have touchpads with hardware scrollbuttons, so...

No, not at all.  I don't have any hardware like that.

Cheers,
Daniel


More information about the xorg-devel mailing list