On Mon, Mar 07, 2011 at 12:42:01PM -0800, Ping Cheng wrote:
> From: Andrzej Pronobis <[email protected]>
> 
> Signed-off-by: Andrzej Pronobis <[email protected]>
> Signed-off-by: Ping Cheng <[email protected]>
> ---
> v2: Refomat a few lines
> ---
>  src/wcmTouchFilter.c |   14 ++++++++++----
>  1 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
> index 093d91f..4afede2 100644
> --- a/src/wcmTouchFilter.c
> +++ b/src/wcmTouchFilter.c
> @@ -54,28 +54,34 @@ static Bool pointsInLine(WacomCommonPtr common, 
> WacomDeviceState ds0,
>               WacomDeviceState ds1)
>  {
>       Bool ret = FALSE;
> +     Bool rotated = common->wcmRotate == ROTATE_CW ||
> +                     common->wcmRotate == ROTATE_CCW;
> +     int horizon_rotated = (rotated) ?

still no room for a "tal"? :)

merged though, thanks.

Cheers,
  Peter

> +                     WACOM_HORIZ_ALLOWED : WACOM_VERT_ALLOWED;
> +     int vertical_rotated = (rotated) ?
> +                     WACOM_VERT_ALLOWED : WACOM_HORIZ_ALLOWED;
>  
>       if (!common->wcmGestureParameters.wcmScrollDirection)
>       {
>               if ((abs(ds0.x - ds1.x) < WACOM_INLINE_DISTANCE) &&
>                       (abs(ds0.y - ds1.y) > WACOM_INLINE_DISTANCE))
>               {
> -                     common->wcmGestureParameters.wcmScrollDirection = 
> WACOM_VERT_ALLOWED;
> +                     common->wcmGestureParameters.wcmScrollDirection = 
> horizon_rotated;
>                       ret = TRUE;
>               }
>               if ((abs(ds0.y - ds1.y) < WACOM_INLINE_DISTANCE) &&
>                       (abs(ds0.x - ds1.x) > WACOM_INLINE_DISTANCE))
>               {
> -                     common->wcmGestureParameters.wcmScrollDirection = 
> WACOM_HORIZ_ALLOWED;
> +                     common->wcmGestureParameters.wcmScrollDirection = 
> vertical_rotated;
>                       ret = TRUE;
>               }
>       }
> -     else if (common->wcmGestureParameters.wcmScrollDirection == 
> WACOM_HORIZ_ALLOWED)
> +     else if (common->wcmGestureParameters.wcmScrollDirection == 
> vertical_rotated)
>       {
>               if (abs(ds0.y - ds1.y) < WACOM_INLINE_DISTANCE)
>                       ret = TRUE;
>       }
> -     else if (common->wcmGestureParameters.wcmScrollDirection == 
> WACOM_VERT_ALLOWED)
> +     else if (common->wcmGestureParameters.wcmScrollDirection == 
> horizon_rotated)
>       {
>               if (abs(ds0.x - ds1.x) < WACOM_INLINE_DISTANCE)
>                       ret = TRUE;
> -- 
> 1.7.4
> 
>

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to