changeset 100367:b6b22701e97c

(tty_free_frame_resources): Renamed from delete_tty_output; all callers changed. Call free_frame_faces to free the face cache.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 11 Dec 2008 20:38:36 +0000
parents 3b103f43d3f6
children 4647905e3ad9
files src/term.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c	Thu Dec 11 20:38:26 2008 +0000
+++ b/src/term.c	Thu Dec 11 20:38:36 2008 +0000
@@ -3183,14 +3183,17 @@
   f->output_data.tty = t;
 }
 
-/* Delete the tty-dependent part of frame F. */
+/* Delete frame F's face cache, and its tty-dependent part. */
 
 static void
-delete_tty_output (struct frame *f)
+tty_free_frame_resources (struct frame *f)
 {
   if (! FRAME_TERMCAP_P (f))
     abort ();
 
+  if (FRAME_FACE_CACHE (f))
+    free_frame_faces (f);
+
   xfree (f->output_data.tty);
 }
 
@@ -3229,7 +3232,7 @@
 
   /* Leave these two set, or suspended frames are not deleted
      correctly.  */
-  terminal->delete_frame_hook = &delete_tty_output;
+  terminal->delete_frame_hook = &tty_free_frame_resources;
   terminal->delete_terminal_hook = &delete_tty;
 }
 
@@ -3273,7 +3276,7 @@
   terminal->read_socket_hook = &tty_read_avail_input; /* keyboard.c */
   terminal->frame_up_to_date_hook = 0; /* Not needed. */
 
-  terminal->delete_frame_hook = &delete_tty_output;
+  terminal->delete_frame_hook = &tty_free_frame_resources;
   terminal->delete_terminal_hook = &delete_tty;
 }
 
@@ -3452,7 +3455,7 @@
   tty->output = stdout;
   tty->input = stdin;
   /* The following two are inaccessible from w32console.c.  */
-  terminal->delete_frame_hook = &delete_tty_output;
+  terminal->delete_frame_hook = &tty_free_frame_resources;
   terminal->delete_terminal_hook = &delete_tty;
 
   tty->name = xstrdup (name);