[PATCH v3 2/3] config: Introduce InputAttributes in NewInputDeviceRequest

Peter Hutterer peter.hutterer at who-t.net
Mon Dec 21 15:21:12 PST 2009


On Mon, Dec 21, 2009 at 10:14:38AM -0800, Dan Nicholson wrote:
> On Thu, Dec 17, 2009 at 5:02 AM, Guillem Jover <guillem at hadrons.org> wrote:
> > Hi!
> >
> > On Thu, 2009-12-17 at 16:56:52 +1000, Peter Hutterer wrote:
> >> On Mon, Dec 14, 2009 at 09:09:01PM -0800, Dan Nicholson wrote:
> >> > diff --git a/include/input.h b/include/input.h
> >> > index afcc006..8ad50cb 100644
> >> > --- a/include/input.h
> >> > +++ b/include/input.h
> >> > @@ -210,6 +210,20 @@ typedef struct _InputOption {
> >> >      struct _InputOption *next;
> >> >  } InputOption;
> >> >
> >> > +typedef struct _InputAttributes {
> >> > +    char                *product;
> >> > +    char                *vendor;
> >> > +    char                *device;
> >> > +    int                 flags;
> >>
> >> unsigned long maybe? i wouldn't be suprised if a whole bunch of these flags
> >> are added in the future.
> >
> > long is going to also be 32-bit on 32-bit architectures, if you want a
> > 64-bit type then probably better to make it explicitly so with a type
> > from <stdin.h>?
> 
> Forgot about this part. What's the consensus here? I would doubt we'd
> ever use more than 32 bits. Is uin32_t OK, or do we want to be
> extremely futureproof with uint64_t?

make the flags unsigned int or uint32_t and I'll be happy. I'd prefer the
unsigned, just for correctness.

Cheers,
  Peter


More information about the xorg-devel mailing list