summaryrefslogtreecommitdiff
path: root/src/synproto.c
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-09 10:43:08 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-03-14 08:47:05 +1000
commit500243ac60ffeb5372e2edbce2f4443a07877d2e (patch)
tree139b80e15d4fd3c6916ef29bc1dce793931bd614 /src/synproto.c
parent420e0abef663729b3ce6e9d26360e616b7270ba6 (diff)
Add cumulative_d{x,y} to SynapticsHwState
These values will be used for clickpad press and drag with two fingers. While the clickpad button is not pressed, cumulative_d{x,y} will match x and y values. Once the clickpad button is pressed, cumulative_d{x,y} will be updated with the relative motion of each active touch on the touchpad. This allows for dragging with one finger while another finger stays stationary holding the clickpad button down. This is an easier and less latent approach than trying to guess which touch was the "dragging" touch. [fixed build error for mt off] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/synproto.c')
-rw-r--r--src/synproto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/synproto.c b/src/synproto.c
index 21e88c4..bdf2d21 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -120,6 +120,8 @@ SynapticsCopyHwState(struct SynapticsHwState *dst,
dst->x = src->x;
dst->y = src->y;
dst->z = src->z;
+ dst->cumulative_dx = src->cumulative_dx;
+ dst->cumulative_dy = src->cumulative_dy;
dst->numFingers = src->numFingers;
dst->fingerWidth = src->fingerWidth;
dst->left = src->left & BTN_EMULATED_FLAG ? 0 : src->left;