summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Harry Cutts <hcutts@google.com> 2024-02-15 14:23:50 +0000
committer Harry Cutts <hcutts@google.com> 2024-02-20 15:28:06 +0000
commit39648ab39cb860d50045a145f650bb47f7b0b585 (patch)
tree1c26d450391c08d2e0b50c9bfc45f667e3cef718 /libs/gui/ConsumerBase.cpp
parent2db1957b07b323dbbe71fe93c743f0a7a00a75e3 (diff)
GestureConverter: Stop flings with fake fingers
Currently, the only way to stop a fling (the scrolling that occurs due to "momentum" after you've finished a two-finger swipe on the touchpad) is to put two fingers down again and move them slightly. This is an awkward gesture, compared to most platforms where you just touch the pad again and scrolling stops. The trouble is that there is currently no API by which we can tell apps to stop a fling. Instead, make a fake finger at the current cursor location, then immediately cancel it. This stops flings without side effects (e.g. activating UI elements, inking in drawing apps, moving the insertion point in text fields, etc.) in every app I've tried it in [0], except for a number of issues in Google Docs, Sheets, and Slides (both the Android apps and when opened in Chrome). We'll have to talk to the relevant teams about this. Follow-up CLs will make an API change to make it easier to distinguish these fling stops from actual clicks. [0]: Calendar, Chrome [1, 2], Docs, Files, Firefox Beta [1, 2], Gmail, Google, Keep, Maps, News, Photos, Play Store, Podcasts, Settings, Sheets, Slides, Word, YouTube [1]: https://www.longestjokeintheworld.com/ [2]: https://codepen.io/caraya/embed/ZyQMWd Bug: 281106755 Test: start flings in a number of apps [0], touch the touchpad, and check that the fling stops without causing other side effects Change-Id: Ie8504dc047ee23b5524d5372f65adfaa75a76cd8
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions