diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eventcomm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c index d3795c1..94f6bc7 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -663,6 +663,7 @@ EventReadHwState(InputInfoPtr pInfo, SynapticsPrivate *priv = (SynapticsPrivate *) pInfo->private; SynapticsParameters *para = &priv->synpara; struct eventcomm_proto_data *proto_data = priv->proto_data; + Bool sync_cumulative = FALSE; SynapticsResetTouchHwState(hw, FALSE); @@ -670,6 +671,7 @@ EventReadHwState(InputInfoPtr pInfo, if (!hw->left && !hw->right && !hw->middle) { hw->cumulative_dx = hw->x; hw->cumulative_dy = hw->y; + sync_cumulative = TRUE; } while (SynapticsReadEvent(pInfo, &ev)) { @@ -745,9 +747,13 @@ EventReadHwState(InputInfoPtr pInfo, switch (ev.code) { case ABS_X: hw->x = apply_st_scaling(proto_data, ev.value, 0); + if (sync_cumulative) + hw->cumulative_dx = hw->x; break; case ABS_Y: hw->y = apply_st_scaling(proto_data, ev.value, 1); + if (sync_cumulative) + hw->cumulative_dy = hw->y; break; case ABS_PRESSURE: hw->z = ev.value; |