summaryrefslogtreecommitdiff
path: root/src/gestures-pan.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-08 11:07:20 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-08 12:05:16 +0200
commit3c63b1e6cc9eb7379e7687a5faec778c5dbfdc98 (patch)
treefad5937d1c16d5d97f704867969fe10880280025 /src/gestures-pan.c
parent301cb7f95a4ca67b42410e65c71ddeefc379cb63 (diff)
Keep both raw and action delta in move model
Accumulated values can be obtained either by using the raw_delta, which is the actual (filtered) change between frames, or by using the action delta, which sums up to the same position, but in a non- linear fashion. Use the raw delta for pointer gestures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/gestures-pan.c')
-rw-r--r--src/gestures-pan.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gestures-pan.c b/src/gestures-pan.c
index b8e1751..c951b78 100644
--- a/src/gestures-pan.c
+++ b/src/gestures-pan.c
@@ -59,10 +59,15 @@ int gru_pan(struct grail *ge,
59 state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); 59 state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame);
60 state->active = 1; 60 state->active = 1;
61 } 61 }
62 if (!(move->active & fm_mask)) 62 if (move->single) {
63 return 0; 63 prop[0] = move->fm[FM_X].raw_delta;
64 prop[0] = move->fm[FM_X].delta; 64 prop[1] = move->fm[FM_Y].raw_delta;
65 prop[1] = move->fm[FM_Y].delta; 65 } else {
66 if (!(move->active & fm_mask))
67 return 0;
68 prop[0] = move->fm[FM_X].action_delta;
69 prop[1] = move->fm[FM_Y].action_delta;
70 }
66 gru_event(ge, state->gid, move, prop, 2); 71 gru_event(ge, state->gid, move, prop, 2);
67 return 1; 72 return 1;
68} 73}