Commit ec0901e5 authored by Gabriele Mazzotta's avatar Gabriele Mazzotta Committed by Peter Hutterer

Use cumulative relative touch movements while scrolling

Signed-off-by: default avatarGabriele Mazzotta <gabriele.mzt@gmail.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 90d19302
......@@ -674,9 +674,11 @@ EventReadHwState(InputInfoPtr pInfo,
SynapticsResetTouchHwState(hw, FALSE);
/* Reset cumulative values if buttons were not previously pressed,
* or no finger was previously present. */
if ((!hw->left && !hw->right && !hw->middle) || hw->z < para->finger_low) {
/* Reset cumulative values if buttons were not previously pressed and no
* two-finger scrolling is ongoing, or no finger was previously present. */
if (((!hw->left && !hw->right && !hw->middle) &&
!(priv->vert_scroll_twofinger_on || priv->vert_scroll_twofinger_on)) ||
hw->z < para->finger_low) {
hw->cumulative_dx = hw->x;
hw->cumulative_dy = hw->y;
sync_cumulative = TRUE;
......
......@@ -3098,9 +3098,11 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
}
}
/* If a physical button is pressed on a clickpad, use cumulative relative
* touch movements for motion */
if (para->clickpad && (priv->lastButtons & 7) &&
/* If a physical button is pressed on a clickpad or a two-finger scrolling
* is ongoing, use cumulative relative touch movements for motion */
if (para->clickpad &&
((priv->lastButtons & 7) ||
(priv->vert_scroll_twofinger_on || priv->horiz_scroll_twofinger_on)) &&
priv->last_button_area != TOP_BUTTON_AREA) {
hw->x = hw->cumulative_dx;
hw->y = hw->cumulative_dy;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment