[PATCH xinput] list: don't use defines for checking server version.

Jeremy Huddleston jeremyhu at apple.com
Thu Aug 11 21:38:59 PDT 2011


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

On Aug 11, 2011, at 9:23 PM, Peter Hutterer wrote:

> Otherwise we run into the old problem again: recompiling xinput against
> newer inputproto headers will appear to change the version support,
> potentially causing errors or other misbehaviours.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> src/list.c |    6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/list.c b/src/list.c
> index b4649eb..b791e81 100644
> --- a/src/list.c
> +++ b/src/list.c
> @@ -248,14 +248,14 @@ static int
> list_xi2(Display *display,
>          enum print_format format)
> {
> -    int major = XI_2_Major,
> -        minor = XI_2_Minor;
> +    int major = 2,
> +        minor = 0;
>     int ndevices;
>     int i, j;
>     XIDeviceInfo *info, *dev;
> 
>     if (XIQueryVersion(display, &major, &minor) != Success ||
> -        (major * 1000 + minor) < (XI_2_Major * 1000 + XI_2_Minor))
> +        (major * 1000 + minor) < 2000)
>     {
>         fprintf(stderr, "XI2 not supported.\n");
>         return EXIT_FAILURE;
> -- 
> 1.7.6
> _______________________________________________
> 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
> 

---
Jeremy Huddleston

Rebuild Sudan
 - Board of Directors
 - http://www.rebuildsudan.org

Berkeley Foundation for Opportunities in Information Technology
 - Advisory Board
 - http://www.bfoit.org



More information about the xorg-devel mailing list