aboutsummaryrefslogtreecommitdiffstats
path: root/java/org/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'java/org/gnu')
-rw-r--r--java/org/gnu/emacs/EmacsWindow.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java
index 007a2a86e68..5c481aa3ef4 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -875,7 +875,14 @@ public final class EmacsWindow extends EmacsHandleObject
875 public boolean 875 public boolean
876 onSomeKindOfMotionEvent (MotionEvent event) 876 onSomeKindOfMotionEvent (MotionEvent event)
877 { 877 {
878 if (!event.isFromSource (InputDevice.SOURCE_CLASS_POINTER)) 878 /* isFromSource is not available until API level 18. */
879
880 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
881 {
882 if (!event.isFromSource (InputDevice.SOURCE_CLASS_POINTER))
883 return false;
884 }
885 else if (event.getSource () != InputDevice.SOURCE_CLASS_POINTER)
879 return false; 886 return false;
880 887
881 switch (event.getAction ()) 888 switch (event.getAction ())