manager = (NotificationManager) tem;
infoBlurb = ("This notification is displayed to keep Emacs"
+ " running while it is in the background. You"
- + " may disable if you want;"
+ + " may disable it if you want;"
+ " see (emacs)Android Environment.");
channel
= new NotificationChannel ("emacs", "Emacs persistent notification",
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. */
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.