diff src/frame.c @ 384:bbff43aa5eb7 r21-2-7

Import from CVS: tag r21-2-7
author cvs
date Mon, 13 Aug 2007 11:08:24 +0200
parents 8626e4521993
children 74fd4e045ea6
line wrap: on
line diff
--- a/src/frame.c	Mon Aug 13 11:07:40 2007 +0200
+++ b/src/frame.c	Mon Aug 13 11:08:24 2007 +0200
@@ -128,6 +128,8 @@
 #define MARKED_SLOT(x) ((void) (markobj (f->x)));
 #include "frameslots.h"
 
+  mark_subwindow_cachels (f->subwindow_cachels, markobj);
+
   if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */
     MAYBE_FRAMEMETH (f, mark_frame, (f, markobj));
 
@@ -203,6 +205,9 @@
   f->selected_window = root_window;
   f->last_nonminibuf_window = root_window;
 
+  /* cache of subwindows visible on frame */
+  f->subwindow_cachels    = Dynarr_new (subwindow_cachel);
+
   /* Choose a buffer for the frame's root window.  */
   XWINDOW (root_window)->buffer = Qt;
   {
@@ -451,9 +456,9 @@
 	 things. */
       init_frame_toolbars (f);
 #endif
-
       reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
       reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
+      reset_subwindow_cachels (f);
       change_frame_size (f, f->height, f->width, 0);
     }
 
@@ -1531,6 +1536,13 @@
   delete_all_subwindows (XWINDOW (f->root_window));
   f->root_window = Qnil;
 
+  /* clear out the cached glyph information */
+  if (f->subwindow_cachels)
+    {
+      Dynarr_free (f->subwindow_cachels);
+      f->subwindow_cachels = 0;
+    }
+
   /* Remove the frame now from the list.  This way, any events generated
      on this frame by the maneuvers below will disperse themselves. */