summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Cutts <hcutts@google.com>2023-11-23 11:45:48 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-11-27 21:01:38 +0000
commite1b20730a2a0cbccb0bc4a1bd98229a33117a407 (patch)
tree788f20ad22b988c1dfbf77a56ec4bd478f8bb426
parent705a01132d889586bc816edf2cefb1c541980712 (diff)
downloadlibchrome-gestures-e1b20730a2a0cbccb0bc4a1bd98229a33117a407.tar.gz
Note that HardwareState::fingers can be null
BUG=b:245989146 TEST=none Change-Id: Ie80d06b0d2e05be1190c423872465d55285e9d35 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/5056835 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Henry Barnor <hbarnor@chromium.org> Tested-by: Harry Cutts <hcutts@chromium.org> Code-Coverage: Henry Barnor <hbarnor@chromium.org> Tested-by: Arpit Singh <arpitks@google.com> Auto-Submit: Harry Cutts <hcutts@chromium.org> Reviewed-by: Henry Barnor <hbarnor@chromium.org> Reviewed-by: Arpit Singh <arpitks@google.com>
-rw-r--r--include/gestures.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/gestures.h b/include/gestures.h
index e2e9c81..3ccaa20 100644
--- a/include/gestures.h
+++ b/include/gestures.h
@@ -243,12 +243,14 @@ struct HardwareState {
// The number of fingers touching the pad, which may be more than finger_cnt.
unsigned short touch_cnt;
// A pointer to an array of FingerState structs with finger_cnt entries,
- // representing the contacts currently being tracked. The order in which
- // FingerStates appear need not be stable between HardwareStates — only the
- // tracking ID is used to track individual contacts over time. Accordingly,
- // when a finger is lifted from the pad (and therefore its ABS_MT_TRACKING_ID
- // becomes -1), the client should simply stop including it in this array,
- // rather than including a final FingerState for it.
+ // representing the contacts currently being tracked. If finger_cnt is 0, this
+ // pointer will be null.
+ //
+ // The order in which FingerStates appear need not be stable between
+ // HardwareStates — only the tracking ID is used to track individual contacts
+ // over time. Accordingly, when a finger is lifted from the pad (and therefore
+ // its ABS_MT_TRACKING_ID becomes -1), the client should simply stop including
+ // it in this array, rather than including a final FingerState for it.
struct FingerState* fingers;
// Mouse axes, which have the same meanings as the Linux evdev axes of the