[PATCH:xf86-input-mouse] MouseCtrl doesn't need to save values we never use

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 12 18:33:24 PDT 2010


On Wed, Aug 11, 2010 at 09:43:24PM -0700, Alan Coopersmith wrote:
> Makes it into a no-op, like evdev's PtrCtrl function, now that
> mouse acceleration is completely handled in dix.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  src/mouse.c       |   18 +++---------------
>  src/xf86OSmouse.h |    3 ---
>  2 files changed, 3 insertions(+), 18 deletions(-)
> 
> diff --git a/src/mouse.c b/src/mouse.c
> index 99d1f2b..a296021 100644
> --- a/src/mouse.c
> +++ b/src/mouse.c
> @@ -1546,26 +1546,14 @@ post_event:
>  
>  /*
>   * MouseCtrl --
> - *      Alter the control parameters for the mouse. Note that all special
> - *      protocol values are handled by dix.
> + *      Alter the control parameters for the mouse. Note that all
> + *      settings are now handled by dix.
>   */
>  
>  static void
>  MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl)
>  {
> -    InputInfoPtr pInfo;
> -    MouseDevPtr pMse;
> -
> -    pInfo = device->public.devicePrivate;
> -    pMse = pInfo->private;
> -
> -#ifdef EXTMOUSEDEBUG
> -    ErrorF("MouseCtrl pMse=%p\n", pMse);
> -#endif
> -    
> -    pMse->num       = ctrl->num;
> -    pMse->den       = ctrl->den;
> -    pMse->threshold = ctrl->threshold;
> +    /* This function intentionally left blank */
>  }
>  
>  /*
> diff --git a/src/xf86OSmouse.h b/src/xf86OSmouse.h
> index 09b8525..33b2232 100644
> --- a/src/xf86OSmouse.h
> +++ b/src/xf86OSmouse.h
> @@ -214,9 +214,6 @@ typedef struct _MouseDevRec {
>      int			oldBaudRate;
>      int			sampleRate;
>      int			lastButtons;
> -    int			threshold;	/* acceleration */
> -    int			num;
> -    int			den;
>      int			buttons;	/* # of buttons */
>      int			emulateState;	/* automata state for 2 button mode */
>      Bool		emulate3Buttons;
> -- 
> 1.5.6.5
> 

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


More information about the xorg-devel mailing list