summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2025-02-17 11:36:14 +0800
committerPo Lu <luangruo@yahoo.com>2025-02-17 11:36:14 +0800
commit25b25fce759d254f5d1ddfb0964e9e0c90869f18 (patch)
treec813173d917f422e446cd0a95fe4b32a694fda8a /java
parent0a6997b58d417043406dadf3d40e6f9de9ded6a8 (diff)
parente3dc0ea2544dc09908546c6e6baba47371cbc176 (diff)
Merge from savannah/emacs-30
e3dc0ea2544 Fix crash in frame deletion on Android e34ea5db5f1 * src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug... 48f9d6aafea * lisp/man.el (Man-shell-file-name): Ensure a Bourne shel... 7016c13e5e6 ; Update etc/AUTHORS (bug#76319). 0bc7b5a389b ; * admin/authors.el (authors-aliases): Add "ElĂ­as Gabrie... e9c4f642b9d ; * doc/emacs/package.texi (Package Installation): Add om... 8c4294f370f ; Move index entries in user manual # Conflicts: # src/pgtkterm.c
Diffstat (limited to 'java')
-rw-r--r--java/org/gnu/emacs/EmacsWindow.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java
index f935850b22b..fec95526835 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -271,20 +271,26 @@ public final class EmacsWindow extends EmacsHandleObject
}
}
- 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 ())
throw new IllegalStateException ("Trying to destroy window with "
+ "children!");
/* Remove the view from its parent and make it invisible. */
EmacsService.SERVICE.runOnUiThread (new Runnable () {
+ @Override
public void
run ()
{
ViewManager parent;
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)
EmacsActivity.focusedWindow = null;