mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 06:50:46 -08:00
Update Android port
* java/org/gnu/emacs/EmacsWindow.java (figureChange): Detect mice on up events as well. (onSomeKindOfMotionEvent): Work past framework bug. * src/androidterm.c (android_perform_conversion_query): * src/textconv.c (textconv_query): * src/textconv.h (TEXTCONV_SKIP_ACTIVE_REGION): Remove unused code.
This commit is contained in:
parent
5964051fce
commit
d6bddca26c
4 changed files with 33 additions and 39 deletions
|
|
@ -755,6 +755,14 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
|
||||
/* Detect mice. If this is a mouse event, give it to
|
||||
onSomeKindOfMotionEvent. */
|
||||
if ((Build.VERSION.SDK_INT
|
||||
>= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||
&& event.getToolType (0) == MotionEvent.TOOL_TYPE_MOUSE)
|
||||
return -2;
|
||||
|
||||
/* Primary pointer released with index 0. */
|
||||
pointerID = event.getPointerId (0);
|
||||
pointerMap.remove (pointerID);
|
||||
|
|
@ -916,6 +924,7 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
EmacsNative.sendLeaveNotify (this.handle, (int) event.getX (),
|
||||
(int) event.getY (),
|
||||
event.getEventTime ());
|
||||
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_BUTTON_PRESS:
|
||||
|
|
@ -949,13 +958,35 @@ public final class EmacsWindow extends EmacsHandleObject
|
|||
return true;
|
||||
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
case MotionEvent.ACTION_UP:
|
||||
/* Emacs must return true even though touch events are not
|
||||
handled here, because the value of this function is used by
|
||||
the system to decide whether or not Emacs gets ACTION_MOVE
|
||||
events. */
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
/* However, if ACTION_UP reports a different button state from
|
||||
the last known state, look up which button was released and
|
||||
send a ButtonRelease event; this is to work around a bug in
|
||||
the framework where real ACTION_BUTTON_RELEASE events are
|
||||
not delivered. */
|
||||
|
||||
if (Build.VERSION.SDK_INT
|
||||
< Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||
return true;
|
||||
|
||||
if (event.getButtonState () == 0 && lastButtonState != 0)
|
||||
{
|
||||
EmacsNative.sendButtonRelease (this.handle, (int) event.getX (),
|
||||
(int) event.getY (),
|
||||
event.getEventTime (),
|
||||
lastModifiers,
|
||||
whatButtonWasIt (event, false));
|
||||
lastButtonState = event.getButtonState ();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
/* Send a scroll event with the specified deltas. */
|
||||
EmacsNative.sendWheel (this.handle, (int) event.getX (),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue