Fix frame focus tracking under Android
* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus): New argument WHENCE, a unique number identifying the circumstances leading up to the call. All callers changed. (attachWindow): Call `invalidateFocus' from the UI thread. (onWindowFocusChanged): Don't remove activity from `focusedActivities' if it already exists should `hasWindowFocus' return true.
This commit is contained in:
@@ -240,7 +240,7 @@ public final class EmacsWindow extends EmacsHandleObject
|
||||
}
|
||||
}
|
||||
|
||||
EmacsActivity.invalidateFocus ();
|
||||
EmacsActivity.invalidateFocus (4);
|
||||
|
||||
if (!children.isEmpty ())
|
||||
throw new IllegalStateException ("Trying to destroy window with "
|
||||
@@ -760,7 +760,7 @@ public final class EmacsWindow extends EmacsHandleObject
|
||||
public void
|
||||
onFocusChanged (boolean gainFocus)
|
||||
{
|
||||
EmacsActivity.invalidateFocus ();
|
||||
EmacsActivity.invalidateFocus (gainFocus ? 6 : 5);
|
||||
}
|
||||
|
||||
/* Notice that the activity has been detached or destroyed.
|
||||
|
||||
Reference in New Issue
Block a user