summaryrefslogtreecommitdiff
path: root/src/activity_replay.cc
diff options
context:
space:
mode:
authorAndrew de los Reyes <adlr@chromium.org>2012-03-23 13:42:03 -0700
committerAndrew de los Reyes <adlr@chromium.org>2012-03-26 13:50:38 -0700
commit53e00a43f190bde34c0b7d02a81d183e9613ab6a (patch)
treed404c61a0432e2aa220bab366c214fb41224d00b /src/activity_replay.cc
parent9de894188b1e6660ab7d1c469acf4960e2289ce9 (diff)
downloadlibchrome-gestures-53e00a43f190bde34c0b7d02a81d183e9613ab6a.tar.gz
gestures.h and others: new flags parameter in FingerState.
It can be nice to tag a FingerState object with flags so that one interpreter may detect a condition and another interpreter may behave differently. This CL adds a flags parameter and two flags: WARP_X and WARP_Y. The warp flags will be used to indicate that a given finger has moved, but it shouldn't cause motion. This may occur if an interpreter decides that while we thought the finger was in a given place, we now realize it's somewhere else. Also, update the IIR filter to pass flags through, and the Lookahead filter to track flags in interpolated events. Finally, for now, we zero the flags parameter in gestures.cc. This should be removed when xf86-input-cmt is updated to zero this memory. BUG=chromium-os:28349 TEST=unittest Change-Id: I70324c463013471b57407d1e63cabd7a080bae3a
Diffstat (limited to 'src/activity_replay.cc')
-rw-r--r--src/activity_replay.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/activity_replay.cc b/src/activity_replay.cc
index 19bc7ca..0e23de7 100644
--- a/src/activity_replay.cc
+++ b/src/activity_replay.cc
@@ -264,6 +264,10 @@ bool ActivityReplay::ParseFingerState(DictionaryValue* entry,
return false;
}
out_fs->tracking_id = tr_id;
+ int flags = 0;
+ if (!entry->GetInteger(ActivityLog::kKeyFingerStateFlags, &flags))
+ Err("can't parse finger's flags; continuing.");
+ out_fs->flags = static_cast<unsigned>(flags);
return true;
}