Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc

Issue 2173603002: Filter GestureFlingStarts with Vx=Vy=0 in RenderWidgetHostViewChildFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment, undo unintended formatting change. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
index 3e8164ae9056ad09f76d197e17b4854489c70a14..540ffd7a5c6cdfa68586c25af178bc68cca27960 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc
@@ -333,14 +333,9 @@ void GestureInterpreterLibevdevCros::OnGestureFling(const Gesture* gesture,
if (!cursor_)
return; // No cursor!
- // We may receive a request for a GESTURE_FLING_START with zero velocity; in
- // this case send a ET_SCROLL_FLING_CANCEL in case it's needed to stop a
- // fling in progress.
- // TODO(wjmaclean): is it possible to get consecutive GESTURE_FLING_STARTs?
- bool should_fling_start = fling->fling_state == GESTURES_FLING_START &&
- (fling->vx != 0 || fling->vy != 0);
EventType type =
- (should_fling_start ? ET_SCROLL_FLING_START : ET_SCROLL_FLING_CANCEL);
+ (fling->fling_state == GESTURES_FLING_START ? ET_SCROLL_FLING_START
+ : ET_SCROLL_FLING_CANCEL);
// Fling is like 2-finger scrolling but with velocity instead of displacement.
dispatcher_->DispatchScrollEvent(ScrollEventParams(

Powered by Google App Engine
This is Rietveld 408576698