]> git.eshelyaron.com Git - emacs.git/commitdiff
Implement `haiku_delete_terminal'
authorPo Lu <luangruo@yahoo.com>
Sun, 20 Mar 2022 05:51:19 +0000 (05:51 +0000)
committerPo Lu <luangruo@yahoo.com>
Sun, 20 Mar 2022 05:52:30 +0000 (05:52 +0000)
* src/haikuterm.c (haiku_delete_terminal): Actually delete the
terminal instead of aborting.

src/haikuterm.c

index 4ae64129ef17655201ba660812553f55d87e4492..221bdfd2ee16752350fa63c0d8ff88c6d33892c4 100644 (file)
@@ -115,7 +115,25 @@ haiku_toolkit_position (struct frame *f, int x, int y,
 static void
 haiku_delete_terminal (struct terminal *terminal)
 {
-  emacs_abort ();
+  struct haiku_display_info *dpyinfo = terminal->display_info.haiku;
+  struct terminal *t;
+
+  if (!terminal->name)
+    return;
+
+  block_input ();
+  be_app_quit ();
+
+  /* Close all frames and delete the generic struct terminal.  */
+  for (t = terminal_list; t; t = t->next_terminal)
+    {
+      if (t->type == output_haiku && t->display_info.haiku == dpyinfo)
+       {
+         delete_terminal (t);
+         break;
+       }
+    }
+  unblock_input ();
 }
 
 static const char *