[PATCH 06/18] Fix the check of Clickpad capabilities

Peter Hutterer peter.hutterer at who-t.net
Tue Oct 12 21:25:42 PDT 2010


On Fri, Oct 08, 2010 at 07:22:30PM +0200, Takashi Iwai wrote:
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> ---
>  src/eventcomm.c |   26 ++++++++++++++++++++------
>  1 files changed, 20 insertions(+), 6 deletions(-)
> 
> diff --git a/src/eventcomm.c b/src/eventcomm.c
> index 8a77788..517e6c3 100644
> --- a/src/eventcomm.c
> +++ b/src/eventcomm.c
> @@ -169,6 +169,25 @@ event_query_info(InputInfoPtr pInfo)
>  }
>  
>  static void
> +event_query_clickpad(LocalDevicePtr local)
> +{
> +    SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
> +
> +    /* clickpad device reports only the single left button mask */
> +    if (priv->has_left && !priv->has_right && !priv->has_middle &&
> +	!priv->has_double &&
> +	priv->model == MODEL_SYNAPTICS) {
> +	priv->is_clickpad = TRUE;
> +	/* enable right/middle button caps; otherwise gnome-settings-daemon
> +	 * will ignore this device for left/right-hand setup because of a
> +	 * single-button
> +	 */

please add this to the commit message.

> +	priv->has_right = priv->has_middle = TRUE;
> +	xf86Msg(X_INFO, "%s: is Clickpad device\n", local->name);
> +    }
> +}
> +
> +static void
>  event_query_led(LocalDevicePtr local)
>  {
>      SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
> @@ -297,12 +316,6 @@ event_query_axis_ranges(InputInfoPtr pInfo)
>  	}
>  
>  	xf86Msg(X_PROBED, "%s: buttons:%s\n", pInfo->name, buf);
> -
> -	/* clickpad device reports only the single left button mask */
> -	if (priv->has_left && !priv->has_right && !priv->has_middle && !priv->has_double) {
> -	    priv->is_clickpad = TRUE;
> -	    xf86Msg(X_PROBED, "%s: is Clickpad device\n", local->name);
> -	}
>      }
>  }
>  
> @@ -462,6 +475,7 @@ EventReadDevDimensions(InputInfoPtr pInfo)
>      if (event_query_is_touchpad(pInfo->fd, (need_grab) ? *need_grab : TRUE))
>  	event_query_axis_ranges(pInfo);
>      event_query_info(pInfo);
> +    event_query_clickpad(local);
>      event_query_led(local);
>  }
>  
> -- 
> 1.7.3.1

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter


More information about the xorg-devel mailing list