mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
Fix crash in frame deletion on Android
* java/org/gnu/emacs/EmacsWindow.java (destroyHandle): Invalidate the input focus in the UI thread, as is proper.
This commit is contained in:
parent
e34ea5db5f
commit
e3dc0ea254
1 changed files with 8 additions and 2 deletions
|
@ -271,20 +271,26 @@ private static class Coordinate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EmacsActivity.invalidateFocus (4);
|
/* This is just a sanity test and is not reliable since `children'
|
||||||
|
may be modified between isEmpty and handle destruction. */
|
||||||
if (!children.isEmpty ())
|
if (!children.isEmpty ())
|
||||||
throw new IllegalStateException ("Trying to destroy window with "
|
throw new IllegalStateException ("Trying to destroy window with "
|
||||||
+ "children!");
|
+ "children!");
|
||||||
|
|
||||||
/* Remove the view from its parent and make it invisible. */
|
/* Remove the view from its parent and make it invisible. */
|
||||||
EmacsService.SERVICE.runOnUiThread (new Runnable () {
|
EmacsService.SERVICE.runOnUiThread (new Runnable () {
|
||||||
|
@Override
|
||||||
public void
|
public void
|
||||||
run ()
|
run ()
|
||||||
{
|
{
|
||||||
ViewManager parent;
|
ViewManager parent;
|
||||||
EmacsWindowManager manager;
|
EmacsWindowManager manager;
|
||||||
|
|
||||||
|
/* Invalidate the focus; this should transfer the input focus
|
||||||
|
to the next eligible window as this window is no longer
|
||||||
|
present in parent.children. */
|
||||||
|
EmacsActivity.invalidateFocus (4);
|
||||||
|
|
||||||
if (EmacsActivity.focusedWindow == EmacsWindow.this)
|
if (EmacsActivity.focusedWindow == EmacsWindow.this)
|
||||||
EmacsActivity.focusedWindow = null;
|
EmacsActivity.focusedWindow = null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue