From: Andrzej Pronobis <a.prono...@gmail.com> Signed-off-by: Ping Cheng <pingli...@gmail.com> --- Hi Andrzej,
I changed your original patch a little and made it into git patch format. If you agree with my changes, please reply to this email with: Signed-off-by: Andrzej Pronobis <a.prono...@gmail.com> Thank you. --- src/wcmTouchFilter.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c index 093d91f..712c667 100644 --- a/src/wcmTouchFilter.c +++ b/src/wcmTouchFilter.c @@ -54,28 +54,32 @@ static Bool pointsInLine(WacomCommonPtr common, WacomDeviceState ds0, WacomDeviceState ds1) { Bool ret = FALSE; + Bool rotated = common->wcmRotate == ROTATE_CW || + common->wcmRotate == ROTATE_CCW; + int rotated_horizon = (rotated) ? WACOM_HORIZ_ALLOWED : WACOM_VERT_ALLOWED; + int rotated_vertical = (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 = rotated_horizon; 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 = rotated_vertical; ret = TRUE; } } - else if (common->wcmGestureParameters.wcmScrollDirection == WACOM_HORIZ_ALLOWED) + else if (common->wcmGestureParameters.wcmScrollDirection == rotated_vertical) { if (abs(ds0.y - ds1.y) < WACOM_INLINE_DISTANCE) ret = TRUE; } - else if (common->wcmGestureParameters.wcmScrollDirection == WACOM_VERT_ALLOWED) + else if (common->wcmGestureParameters.wcmScrollDirection == rotated_horizon) { 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 Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel