On Tue, Mar 29, 2011 at 04:18:30PM -0700, Jason Gerecke wrote:
> *facepalm* I simply can't believe I didn't test this, but there's
> no denying the bug exists. Looks like the change to 'btnact_prop'
> *must* occur after the change to 'prop'. If it happens beforehand,
> then the driver appears to be eternally one step behind xsetwacom.
> 
> Signed-off-by: Jason Gerecke <killert...@gmail.com>
> ---

applied, but from a cursory glance I'm not sure why. In fact, I would have
guessed the other way round. anyway, I've added a comment to avoid this in
the future (at least until we find the reason why and fixed it).

Cheers,
  Peter

>  tools/xsetwacom.c |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
> index 1cc3da9..f545f95 100644
> --- a/tools/xsetwacom.c
> +++ b/tools/xsetwacom.c
> @@ -1236,17 +1236,17 @@ static void special_map_property(Display *dpy, 
> XDevice *dev, Atom btnact_prop, i
>                       sprintf(buff, "Wacom button action %d", (offset + 1));
>                       prop = XInternAtom(dpy, buff, False);
>                       btnact_data[offset] = prop;
> +             }
>  
> -                     XChangeDeviceProperty(dpy, dev, btnact_prop, XA_ATOM, 
> 32,
> +
> +             XChangeDeviceProperty(dpy, dev, prop, XA_INTEGER, 32,
> +                                     PropModeReplace,
> +                                     (unsigned char*)data, nitems);
> +
> +             XChangeDeviceProperty(dpy, dev, btnact_prop, XA_ATOM, 32,
>                                               PropModeReplace,
>                                               (unsigned char*)btnact_data,
>                                               btnact_nitems);
> -             }
> -
> -
> -             XChangeDeviceProperty(dpy, dev, prop, XA_INTEGER, 32,
> -                                     PropModeReplace,
> -                                     (unsigned char*)data, nitems);
>       }
>       else if (prop)
>       { /* Unsetting a property that exists */
> -- 
> 1.7.4.1

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to