[PATCH xinput] Handle XA_CARDINAL as property type
Peter Hutterer
peter.hutterer at who-t.net
Wed Feb 22 16:40:14 PST 2012
On Thu, Feb 23, 2012 at 01:26:24AM +0100, Chase Douglas wrote:
> On 02/21/2012 02:57 AM, Peter Hutterer wrote:
> >Signed-off-by: Peter Hutterer<peter.hutterer at who-t.net>
> >---
> > src/property.c | 32 ++++++++++++++++++++++++++++++--
> > 1 files changed, 30 insertions(+), 2 deletions(-)
> >
> >diff --git a/src/property.c b/src/property.c
> >index 7723445..3ab2cb0 100644
> >--- a/src/property.c
> >+++ b/src/property.c
> >@@ -97,6 +97,20 @@ print_property(Display *dpy, XDevice* dev, Atom property)
> > break;
> > }
> > break;
> >+ case XA_CARDINAL:
> >+ switch(act_format)
> >+ {
> >+ case 8:
> >+ printf("%u", *((unsigned char*)ptr));
> >+ break;
> >+ case 16:
> >+ printf("%u", *((unsigned short*)ptr));
> >+ break;
> >+ case 32:
> >+ printf("%lu", *((unsigned long*)ptr));
>
> I think a comment here would help, even if it's just "This really
> isn't a bug, 32 format properties are 64-bits on 64-bit machines!"
> Super ugly...
More information about the xorg-devel
mailing list