[PATCH synaptics 07/12] Use post_button_click to post doubleclicks.

Jamey Sharp jamey at minilop.net
Fri May 7 16:40:21 PDT 2010


The first hunk is obviously an improvement but the other two aren't clear to me.

On Thu, May 6, 2010 at 9:41 PM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> @@ -2288,11 +2286,8 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState *hw)
>        post_scroll_events(local, scroll);
>
>     if (double_click) {
> -       int i;
> -       for (i = 0; i < 2; i++) {
> -           xf86PostButtonEvent(local->dev, FALSE, 1, !hw->left, 0, 0);
> -           xf86PostButtonEvent(local->dev, FALSE, 1, hw->left, 0, 0);
> -       }
> +       post_button_click(local, 1);
> +       post_button_click(local, 1);
>     }

An earlier commit converted the !hw->foo, hw->foo pattern to TRUE,
FALSE; perhaps that commit should make the same change here before
this one replaces the pair with post_button_click?

> @@ -2320,8 +2315,7 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState *hw)
>            while (change) {
>                id = ffs(change);
>                change &= ~(1 << (id - 1));
> -               xf86PostButtonEvent(local->dev, FALSE, id, FALSE, 0, 0);
> -               xf86PostButtonEvent(local->dev, FALSE, id, TRUE, 0, 0);
> +               post_button_click(local, id);
>            }

Here the button events are exactly backwards. Was that intentional,
and is it OK to swap them, as this patch does?

Jamey


More information about the xorg-devel mailing list