Bug 701292 - Fix clicking while panning [r=pcwalton]
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 10 Nov 2011 11:46:18 -0500
changeset 83456 ce4ebd1d2c9fe6b0a24f078733d381af5e744a16
parent 83455 8cca0568a65f8001204f8ec61f2723b3f3072cd2
child 83457 6da7470b607c89561c788f7fa596e580702f37a0
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspcwalton
bugs701292
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 701292 - Fix clicking while panning [r=pcwalton] This is a temporary fix that reduces the incidence of accidental clicks while panning. It probably messes with touch events but those aren't working now anyway.
embedding/android/gfx/LayerController.java
--- a/embedding/android/gfx/LayerController.java
+++ b/embedding/android/gfx/LayerController.java
@@ -271,15 +271,16 @@ public class LayerController {
     }
 
     /*
      * Gesture detection. This is handled only at a high level in this class; we dispatch to the
      * pan/zoom controller to do the dirty work.
      */
 
     public boolean onTouchEvent(MotionEvent event) {
-        boolean result = mPanZoomController.onTouchEvent(event);
+        if (mPanZoomController.onTouchEvent(event))
+            return true;
         if (mOnTouchListener != null)
-            result = mOnTouchListener.onTouch(mView, event) || result;
-        return result;
+            return mOnTouchListener.onTouch(mView, event);
+        return false;
     }
 }