[PATCH:xf86-input-mouse 1/2] Raise bar for xorg-server to 1.7 for XINPUT ABI 7

Jeremy Huddleston Sequoia jeremyhu at apple.com
Tue Jul 24 11:01:52 PDT 2012


LOL, I guess that's one way to do it ;)

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>

On Jul 23, 2012, at 22:44, Alan Coopersmith <alan.coopersmith at oracle.com> wrote:

> Not all of the button label settings were wrapped in ABI #ifdefs,
> so just drop all #ifdefs for GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> configure.ac |    2 +-
> src/mouse.c  |   16 ++--------------
> 2 files changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index ba55829..4e50a53 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -46,7 +46,7 @@ XORG_DEFAULT_OPTIONS
> XORG_WITH_LINT
> 
> # Obtain compiler/linker options from server and required extensions
> -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto)
> +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto inputproto)
> 
> # Define a configure option for an alternate input module directory
> AC_ARG_WITH(xorg-module-dir,
> diff --git a/src/mouse.c b/src/mouse.c
> index 7d1ee1b..70ea7fb 100644
> --- a/src/mouse.c
> +++ b/src/mouse.c
> @@ -1673,10 +1673,8 @@ MouseProc(DeviceIntPtr device, int what)
>     mousePrivPtr mPriv;
>     unsigned char map[MSE_MAXBUTTONS + 1];
>     int i;
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
>     Atom btn_labels[MSE_MAXBUTTONS] = {0};
>     Atom axes_labels[2] = { 0, 0 };
> -#endif
> 
>     pInfo = device->public.devicePrivate;
>     pMse = pInfo->private;
> @@ -1693,29 +1691,21 @@ MouseProc(DeviceIntPtr device, int what)
>         for (i = 0; i < MSE_MAXBUTTONS; i++)
>             map[i + 1] = i + 1;
> 
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
>         MouseInitButtonLabels(btn_labels);
>         axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
>         axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
> -#endif
> 
>         InitPointerDeviceStruct((DevicePtr)device, map,
>                                 min(pMse->buttons, MSE_MAXBUTTONS),
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
>                                 btn_labels,
> -#endif
>                                 pMse->Ctrl,
> -                                GetMotionHistorySize(), 2
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
> -                                , axes_labels
> -#endif
> +                                GetMotionHistorySize(), 2,
> +                                axes_labels
>                                 );
> 
>         /* X valuator */
>         xf86InitValuatorAxisStruct(device, 0,
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
>                 axes_labels[0],
> -#endif
>                 -1, -1, 1, 0, 1
> #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
>                 , Relative
> @@ -1724,9 +1714,7 @@ MouseProc(DeviceIntPtr device, int what)
>         xf86InitValuatorDefaults(device, 0);
>         /* Y valuator */
>         xf86InitValuatorAxisStruct(device, 1,
> -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
>                 axes_labels[1],
> -#endif
>                 -1, -1, 1, 0, 1
> #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
>                 , Relative
> -- 
> 1.7.9.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 



More information about the xorg-devel mailing list