Update Android port

* java/org/gnu/emacs/EmacsService.java (onStartCommand): Fix
typo in notification message.
* java/org/gnu/emacs/EmacsWindow.java (onFocusChanged): Reset
the recorded modifier state upon a change to the window focus.
This commit is contained in:
Po Lu
2023-07-09 12:50:15 +08:00
parent 8afb5644fd
commit 97f926b82d
2 changed files with 9 additions and 2 deletions

View File

@@ -99,7 +99,8 @@ public final class EmacsWindow extends EmacsHandleObject
private EmacsGC scratchGC;
/* The button state and keyboard modifier mask at the time of the
last button press or release event. */
last button press or release event. The modifier mask is reset
upon each window focus change. */
public int lastButtonState, lastModifiers;
/* Whether or not the window is mapped. */
@@ -670,6 +671,12 @@ public final class EmacsWindow extends EmacsHandleObject
onFocusChanged (boolean gainFocus)
{
EmacsActivity.invalidateFocus ();
/* If focus has been lost, reset the keyboard modifier state, as
subsequent changes will not be recorded. */
if (!gainFocus)
lastModifiers = 0;
}
/* Notice that the activity has been detached or destroyed.