Re: [Linuxwacom-devel] Getting Ready for 0.13

2011-12-29 Thread Chris Bagwell
On Thu, Dec 29, 2011 at 3:39 PM, Jason Gerecke  wrote:
> Its been six weeks since 0.12 was released, so I'd like to start
> looking at getting 0.13 out of the door. There are a few patches in
> need of review, and a couple bug reports that need further action.
> I'll be making the RC1 release on Saturday, so now's the time to
> submit/review/nominate anything you'd like to get into 0.13.
>

I do not have any work for 0.13 but I will try to finish up review of
gesture patches.  I'm sure people would love to have tap-and-drag
gesture that it looks like it adds.

Chris

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH input-wacom] Add missing input_mt_get_value() for 2.6.36/37

2011-12-29 Thread chris
From: Chris Bagwell 

Reported in bug tracker #3463769.

Based on mini code review, I think this is only missing
symbol and 2.6.36/37 contain ABS_MT_FIRST and input_mt_slot
which this function depends on.

I'm unable to test this fix but its a copy&paste of
function from mt.h in later kernels.
---
 2.6.36/wacom.h |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/2.6.36/wacom.h b/2.6.36/wacom.h
index 3117877..569ad9c 100644
--- a/2.6.36/wacom.h
+++ b/2.6.36/wacom.h
@@ -94,6 +94,12 @@
 # endif 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37)
 #include 
+#else
+static inline int input_mt_get_value(const struct input_mt_slot *slot,
+ unsigned code)
+{
+return slot->abs[code - ABS_MT_FIRST];
+}
 #endif
 #include 
 
-- 
1.7.7.4


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] Getting Ready for 0.13

2011-12-29 Thread Jason Gerecke
Its been six weeks since 0.12 was released, so I'd like to start
looking at getting 0.13 out of the door. There are a few patches in
need of review, and a couple bug reports that need further action.
I'll be making the RC1 release on Saturday, so now's the time to
submit/review/nominate anything you'd like to get into 0.13.

Jason

---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH v5 1/5] De-duplicate code for wheel/strip scrolling

2011-12-29 Thread Jason Gerecke
On Wed, Dec 21, 2011 at 9:27 PM, Peter Hutterer
 wrote:
> On Wed, Dec 21, 2011 at 03:28:54PM -0800, Jason Gerecke wrote:
>> Replaces sendWheelStripEvents and getWheelButton with several
>> small functions to reduce unnecessary code duplication.
>>
>> As a side-effect, it is now possible for the driver to handle
>> simultaneous scrolls on multiple axes. Previously, getWheelButton
>> would go through all the axes but was limited to returning a
>> single button/action.
>>
>> Signed-off-by: Jason Gerecke 
>
> Reviewed-by: Peter Hutterer 
>
> thank you!
>
> Cheers,
>  Peter
>
>> ---
>> Changes from v3:
>>  * Move to head of patchset
>>  * Add tests for getScrollDelta and getWheelButton
>>  * Fix bugs in getScrollDelta doc (wrap is max, not max+1)
>>  * Fix bugs in getScrollDelta implementation
>>     * log2(0) is undef; caused problems with current or old == 0
>>     * wrap now properly handled with AXIS_BITWISE
>>
>>  src/wcmCommon.c     |  177 
>> +--
>>  src/xf86WacomDefs.h |    2 +
>>  test/wacom-tests.c  |   84 
>>  3 files changed, 200 insertions(+), 63 deletions(-)
>>
>> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
>> index e85c6d8..e6eb958 100644
>> --- a/src/wcmCommon.c
>> +++ b/src/wcmCommon.c
>> @@ -317,73 +317,106 @@ static void sendAButton(InputInfoPtr pInfo, int 
>> button, int mask,
>>                  first_val, num_val, valuators);
>>  }
>>
>> -/*
>> - * getWheelButton --
>> - *   Get the wheel button to be sent for the current device state.
>> - 
>> /
>> -
>> -static int getWheelButton(InputInfoPtr pInfo, const WacomDeviceState* ds,
>> -                       unsigned int **fakeKey)
>> +/**
>> + * Get the distance an axis was scrolled. This function is aware
>> + * of the different ways different scrolling axes work and strives
>> + * to produce a common representation of relative change.
>> + *
>> + * @param current  Current value of the axis
>> + * @param old      Previous value of the axis
>> + * @param wrap     Maximum value before wraparound occurs (0 if axis does 
>> not wrap)
>> + * @param flags    Flags defining axis attributes: AXIS_INVERT and 
>> AXIS_BITWISE
>> + * @return         Relative change in axis value
>> + */
>> +static int getScrollDelta(int current, int old, int wrap, int flags)
>>  {
>> -     WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
>> -     int fakeButton = 0, value = 0;
>> +     int delta;
>>
>> -     /* emulate events for relative wheel */
>> -     if ( ds->relwheel )
>> +     if (flags & AXIS_BITWISE)
>>       {
>> -             value = ds->relwheel;
>> -             fakeButton = (value > 0) ? priv->relup : priv->reldn;
>> -             *fakeKey = (value > 0) ? priv->wheel_keys[0+1] : 
>> priv->wheel_keys[1+1];
>> +             current = (int)log2((current << 1) | 0x01);
>> +             old = (int)log2((old << 1) | 0x01);
>> +             wrap = (int)log2((wrap << 1) | 0x01);
>>       }
>>
>> -     /* emulate events for absolute wheel when it is a touch ring (on pad) 
>> */
>> -     if ( (ds->abswheel != priv->oldWheel) && IsPad(priv) &&
>> -         (priv->oldProximity == ds->proximity))
>> +     delta = current - old;
>> +
>> +     if (flags & AXIS_INVERT)
>> +             delta = -delta;
>> +
>> +     if (wrap != 0)
>>       {
>> +             /* Wraparound detection. If the distance old..current
>> +              * is larger than the old..current considering the
>> +              * wraparound, assume wraparound and readjust */
>>               int wrap_delta;
>> -             value = priv->oldWheel - ds->abswheel;
>>
>> -             /* Wraparound detection. If the distance oldvalue..value is
>> -              * larger than the oldvalue..value considering the
>> -              * wraparound, assume wraparound and readjust */
>> -             if (value < 0)
>> -                     wrap_delta = ((MAX_PAD_RING + 1) + priv->oldWheel) - 
>> ds->abswheel;
>> +             if (delta < 0)
>> +                     wrap_delta =  (wrap + 1) + delta;
>>               else
>> -                     wrap_delta = priv->oldWheel - ((MAX_PAD_RING + 1) + 
>> ds->abswheel);
>> +                     wrap_delta = -((wrap + 1) - delta);
>>
>> -             DBG(12, priv, "wrap detection for %d (old %d): %d (wrap %d)\n",
>> -                 ds->abswheel, priv->oldWheel, value, wrap_delta);
>> +             if (abs(wrap_delta) < abs(delta))
>> +                     delta = wrap_delta;
>> +     }
>>
>> -             if (abs(wrap_delta) < abs(value))
>> -                     value = wrap_delta;
>> +     return delta;
>> +}
>>
>> -             fakeButton = (value > 0) ? priv->wheelup : priv->wheeldn;
>> -             *fakeKey = (value > 0) ? priv->wheel_keys[2+1] : 
>> priv->wheel_keys[3+1];
>> -     }
>> +/**
>> + * Get the scroll button/action to send