doh, that got stuck in my outbox.

On Mon, Jan 04, 2010 at 09:24:58PM -0500, Jason Childs wrote:
> I've been over on the Ubuntu list, and I was asked to put the latest
> patch over here.  I figured the devel list was the best place to send
> this.  I just got done testing a second revision of the patch.  The
> other patch I'm attaching (linuxwacom-0.8.5-9-spelling.patch) is a
> spelling correction of the function xf86WcmVirtualTabletSize (spelled
> virtaul in the code).  The patch gets pen working again on the Bamboo
> P&T tablets 0xd0-0xd4 and fixes the touch scaling for 0xd0-0xd3
> tablets with touch.

first of all - thanks for the patches. The virtual spelling patches are
already in xf86-input-wacom.

> As far a bugs, the gesture scrolling and zooming is still not working
> reliably.  I think there is more work that needs to be done on the
> kernel side to clean up the finger up events since it is
> differentiating between which finger was released and the X driver may
> see the first finger lift while the second is still down, which gets
> the cursor locked in gesture mode.  Also if the tablet is plugged in
> after X is already running (even gdm), HAL will send the pad and touch
> devices out of order and pad gets all the good data about what the
> size of the tablet should be.  Seems like there is no good place to
> try and copy the pad data over to the touch subdevice to alleviate
> this problem and with HAL going away, it might not be worth it to fix
> it.

HAL won't go away until server 1.8 which is due in the end of March and will
take some more time to end up in the distributions. Plenty of time for this
bug to get fixed.

I'll have to skip the kernel parts, not my forte. The X driver patches
should be split into three separate patches, the capacityDefault patch, the
finger touch routine reordering and the tablet_id patch. This way it'll be
easier to bisect and understand the code.  I'll refer to Ping's comments on
the patches for now for the actual content of the patches.

Cheers,
  Peter
 
> src/xdrv/wcmCommon.c
>   * reordered the one/two finger touch routines in wcmEvent since the
>     common->wcmGesture variable was being used to determine if single
>     finger events should be processed.  This never changes once the tablet has
>     been initialised and one finger touch never worked.  (This was masked by 
> the
>     capacity issue below).
>   * common->wcmCapacityDefault was used in some places rather than the
>     configurable common->wcmCapacity.


> src/xdrv/wcmConfig.c
>   * added capacity check for tablet_id 0xd0 to 0xd3.  it will set the
>     common->wcmCapacityDefault = 3 (as stated in comments for it in
>     xf86WcmAllocate).  This keeps the left click from always being pressed
>     when a single finger touches the tablet.
> src/xdrv/wcmUSB.c
>   * changed a check of common->wcmCapacityDefault to check
>      common->wcmCapacity instead.

> --- a/linuxwacom/src/xdrv/wcmCommon.c 2009-12-30 19:05:15.000000000 -0500
> +++ b/linuxwacom/src/xdrv/wcmCommon.c 2010-01-04 00:31:13.546021076 -0500
> @@ -1132,52 +1132,50 @@
>  #ifndef WCM_KEY_SENDING_SUPPORT
>       common->wcmGesture = 0;
>  #endif
> -     /* process second finger data if exists */
> -     if ((ds.device_type == TOUCH_ID) && common->wcmTouch && 
> common->wcmGesture)
> +     if ((ds.device_type == TOUCH_ID) && common->wcmTouch)
>       {
> -             WacomChannelPtr pOtherChannel;
> -             WacomDeviceState dsOther;
> -
> -             /* exit gesture mode when both fingers are out */
> -             if (channel)
> -                     pOtherChannel = common->wcmChannel;
> -             else
> -                     pOtherChannel = common->wcmChannel + 1;
> -             dsOther = pOtherChannel->valid.state;
> -
> -             /* This is the only place to reset gesture mode
> -              * once a gesture mode is entered */
> -             if (!ds.proximity && !dsOther.proximity)
> -             {
> -                     common->wcmGestureMode = 0;
> -
> -                     /* send a touch out-prox event here
> -                      * in case the FF was out before the SF */
> -                     channel = 0;
> -             }
> -             else
> -             {
> -                     /* don't move the cursor if in gesture mode
> -                      * wait for second finger data to process gestures */
> -                     if (!channel && common->wcmGestureMode)
> -                             goto ret;
> +             WacomDeviceState* pds = &common->wcmTouchpadState;
> +             WacomDevicePtr priv = common->wcmDevices;
>  
> -                     /* process gesture when both touch and geature are 
> enabled */
> +             /* process second finger data if exists */
> +             if (common->wcmGesture) {
> +                     WacomChannelPtr pOtherChannel;
> +                     WacomDeviceState dsOther;
> +                     /* exit gesture mode when both fingers are out */
>                       if (channel)
> +                             pOtherChannel = common->wcmChannel;
> +                     else
> +                             pOtherChannel = common->wcmChannel + 1;
> +                     dsOther = pOtherChannel->valid.state;
> +
> +                     /* This is the only place to reset gesture mode
> +                      * once a gesture mode is entered */
> +                     if (!ds.proximity && !dsOther.proximity)
> +                     {
> +                             common->wcmGestureMode = 0;
> +
> +                             /* send a touch out-prox event here
> +                              * in case the FF was out before the SF */
> +                             channel = 0;
> +                     }
> +                     else
>                       {
> -                             xf86WcmFingerTapToClick(common);
> -                             goto ret;
> +                             /* don't move the cursor if in gesture mode
> +                              * wait for second finger data to process 
> gestures */
> +                             if (!channel && common->wcmGestureMode)
> +                                     goto ret;
> +
> +                             /* process gesture when both touch and gesture 
> are enabled */
> +                             if (channel)
> +                             {
> +                                     xf86WcmFingerTapToClick(common);
> +                                     goto ret;
> +                             }
>                       }
>               }
> -     }
> -
> -     /* process single finger events */
> -     if (ds.device_type == TOUCH_ID && common->wcmTouch && 
> !common->wcmGesture)
> -     {
> -             WacomDeviceState* pds = &common->wcmTouchpadState;
> -             WacomDevicePtr priv = common->wcmDevices;
>  
> -             if (ds.proximity)
> +             /* process single finger events if no gestures were processed */
> +             if (ds.proximity) {
>                       switch (common->wcmTouchpadMode)
>                       {
>                               case 0:
> @@ -1202,7 +1200,7 @@
>                                       }
>                                       break;
>                       }
> -             else {
> +             } else {
>                       switch (common->wcmTouchpadMode)
>                       {
>                               case 1:
> @@ -1479,7 +1477,7 @@
>               }
>  
>               /* touch capacity is supported */
> -             if (IsTouch(priv) && (common->wcmCapacityDefault >= 0) && 
> !priv->hardProx)
> +             if (IsTouch(priv) && (common->wcmCapacity >= 0) && 
> !priv->hardProx)
>               {
>                       if (((double)(filtered.capacity * 5) / 
>                                       (double)common->wcmMaxZ) > 
> --- a/linuxwacom/src/xdrv/wcmConfig.c 2009-12-30 19:05:15.000000000 -0500
> +++ b/linuxwacom/src/xdrv/wcmConfig.c 2010-01-04 19:59:43.243532406 -0500
> @@ -459,6 +459,15 @@
>               common->wcmGestureDefault = 1;
>       }
>  
> +     /* Bamboo P&T Capacity defaults to 3 */
> +     if ((common->tablet_id >= 0xd0) && (common->tablet_id <= 0xd3)) {
> +
> +             /* Capacity is off for all devices except on
> +              * Bamboo Pen & Touch devices
> +              */
> +             common->wcmCapacityDefault = 3;
> +     }
> +
>       /* check if touch was turned off in xorg.conf */
>       common->wcmTouch = xf86SetBoolOption(local->options, "Touch",
>               common->wcmTouchDefault);


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to