1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 00:50:44 -08:00

Avoid destroying windows after they are unmapped

* java/org/gnu/emacs/EmacsActivity.java (destroy): Detach from
current window before calling finish.

* java/org/gnu/emacs/EmacsWindow.java (reparentTo): Don't clear
attachment state here...

* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
...but do so here instead.
This commit is contained in:
Po Lu 2024-04-04 09:53:07 +08:00
parent 3608c1399f
commit 42c0603c7a
3 changed files with 20 additions and 8 deletions

View file

@ -238,15 +238,19 @@ public final class EmacsWindowManager
{
WindowConsumer consumer;
if (window.getAttachedConsumer () != null)
{
consumer = window.getAttachedConsumer ();
/* Reset window management state. */
window.previouslyAttached = false;
window.attachmentToken = 0;
/* Remove WINDOW from the list of active windows. */
windows.remove (window);
if ((consumer = window.getAttachedConsumer ()) != null)
{
consumers.remove (consumer);
consumer.destroy ();
}
windows.remove (window);
pruneWindows ();
}