summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsNative.java9
-rw-r--r--java/org/gnu/emacs/EmacsWindow.java19
2 files changed, 19 insertions, 9 deletions
diff --git a/java/org/gnu/emacs/EmacsNative.java b/java/org/gnu/emacs/EmacsNative.java
index 1331539879a..d4d502ede5a 100644
--- a/java/org/gnu/emacs/EmacsNative.java
+++ b/java/org/gnu/emacs/EmacsNative.java
@@ -142,15 +142,18 @@ public final class EmacsNative
/* Send an ANDROID_TOUCH_DOWN event. */
public static native long sendTouchDown (short window, int x, int y,
- long time, int pointerID);
+ long time, int pointerID,
+ int flags);
/* Send an ANDROID_TOUCH_UP event. */
public static native long sendTouchUp (short window, int x, int y,
- long time, int pointerID);
+ long time, int pointerID,
+ int flags);
/* Send an ANDROID_TOUCH_MOVE event. */
public static native long sendTouchMove (short window, int x, int y,
- long time, int pointerID);
+ long time, int pointerID,
+ int flags);
/* Send an ANDROID_WHEEL event. */
public static native long sendWheel (short window, int x, int y,
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java
index 0e96a8382d0..8118479319e 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -1025,23 +1025,30 @@ public final class EmacsWindow extends EmacsHandleObject
/* Touch down event. */
EmacsNative.sendTouchDown (this.handle, coordinate.x,
coordinate.y, time,
- coordinate.id);
+ coordinate.id, 0);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP:
+ /* Touch up event. */
+ EmacsNative.sendTouchUp (this.handle, coordinate.x,
+ coordinate.y, time,
+ coordinate.id, 0);
+ break;
+
case MotionEvent.ACTION_CANCEL:
- /* Touch up event. Android documentation says ACTION_CANCEL
- should be treated as more or less equivalent to ACTION_UP,
- so that is what is done here. */
+ /* Touch sequence cancellation event. */
EmacsNative.sendTouchUp (this.handle, coordinate.x,
- coordinate.y, time, coordinate.id);
+ coordinate.y, time,
+ coordinate.id,
+ 1 /* ANDROID_TOUCH_SEQUENCE_CANCELED */);
break;
case MotionEvent.ACTION_MOVE:
/* Pointer motion event. */
EmacsNative.sendTouchMove (this.handle, coordinate.x,
- coordinate.y, time, coordinate.id);
+ coordinate.y, time,
+ coordinate.id, 0);
break;
}
}