On 2011-03-01 09:52, Pander wrote:
> On 2011-02-28 12:45, Pander wrote:
>> Hi all,
>>
>> I would like to make the following feature request for
>> inverting/toggling parameters.
>>
>> Please extend values for the following parameters with "invert":
>>
>> touch:          on, off, invert (toggle)
>> gesture:        on, off, invert (toggle)
>> tabletpcbutton: on, off, invert (toggle)
>> rawfilter:      on, off, invert (toggle)
>> mode:           absolute, relative, invert (toggle)
>> rotate:         none, cw, ccw, half, invert (+180 degrees)
>>
>> Implementing this will make it easier for application, scripts, and
>> command line usage to toggle parameters without having to remember the
>> status or first requesting the current status in order to toggle a value.
> 
> I have made an attempt myself but it will only work once. :( Could
> someone help me out with this one since I'm new to this project.
> 
> --- xf86-input-wacom/tools/.xsetwacom.c       2011-02-28 23:45:44.886995005 
> +0100
> +++ xf86-input-wacom/tools/xsetwacom.c        2011-03-01 00:06:43.296995005 
> +0100
> @@ -1351,6 +1351,11 @@ static void set_mode(Display *dpy, XDevi
>               mode = Relative;
>       else if (strcasecmp(argv[0], "Absolute") == 0)
>               mode = Absolute;
> +     else if (strcasecmp(argv[0], "invert") == 0)
> +             if (mode == Absolute)
> +                     mode = Relative;
> +             else if (mode == Relative)
> +                     mode = Absolute;
>       else
>       {
>               printf("Invalid device mode. Use 'Relative' or 'Absolute'.\n");
> @@ -1389,6 +1394,15 @@ static void set_rotate(Display *dpy, XDe
>               if (rotation < 0 || rotation > 3)
>                       goto error;
>       }
> +     else if (strcasecmp(argv[0], "invert") == 0)
> +             if (rotation == 0)
> +                     rotation = 3;
> +             else if (rotation == 1)
> +                     rotataion = 2;
> +             else if (rotation == 2)
> +                     rotation = 1;
> +             else if (rotation == 3)
> +                     rotation = 0;
> 
>       prop = XInternAtom(dpy, param->prop_name, True);
>       if (!prop)

I have found a typo in rotation (rotataion). Nevertheless, I would like
to get some feedback if possible. Does it work for other people?

>> Thanks,
>>
>> Pander
>>
>>
>> PS   This would only apply to xsetwacom and control via GNOME. It is not
>> advisable to use this in xorg config files.
>>
>> ------------------------------------------------------------------------------
>> Free Software Download: Index, Search & Analyze Logs and other IT data in 
>> Real-Time with Splunk. Collect, index and harness all the fast moving IT 
>> data 
>> generated by your applications, servers and devices whether physical, virtual
>> or in the cloud. Deliver compliance at lower cost and gain new business 
>> insights. http://p.sf.net/sfu/splunk-dev2dev 
>> _______________________________________________
>> Linuxwacom-devel mailing list
>> Linuxwacom-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> 
> 
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to