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

Unified Diff: ui/android/java/src/org/chromium/ui/base/EventForwarder.java

Issue 2842823002: chrome/android: Consume down events for mouse drag gesture. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/EventForwarder.java
diff --git a/ui/android/java/src/org/chromium/ui/base/EventForwarder.java b/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
index 1ffb77f558b57c928b26bd5c0a8e74d5c03ffcba..e8986350d44b04205d4df7579d3d1b13b244d6c8 100644
--- a/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
+++ b/ui/android/java/src/org/chromium/ui/base/EventForwarder.java
@@ -158,7 +158,10 @@ public class EventForwarder {
// and ACTION_BUTTON_RELEASE respectively because they provide
// info about the changed-button.
if (eventAction == MotionEvent.ACTION_DOWN || eventAction == MotionEvent.ACTION_UP) {
- return false;
+ // While we use the action buttons for the changed state it is important to still
+ // consume the down/up events to get the complete stream for a drag gesture, which
+ // is provided using ACTION_MOVE touch events.
+ return true;
}
sendMouseEvent(event.getEventTime(), eventAction, offsetEvent.getX(),
offsetEvent.getY(), event.getPointerId(0), event.getPressure(0),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698