Index: src/glyphs.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs.c,v retrieving revision 1.23.2.65 diff -u -r1.23.2.65 glyphs.c --- src/glyphs.c 2000/05/04 16:04:17 1.23.2.65 +++ src/glyphs.c 2000/05/09 11:23:12 @@ -4245,6 +4245,23 @@ } } +/* Unmap and remove all instances from the frame cache. */ +void +reset_frame_subwindow_instance_cache (struct frame* f) +{ + Lisp_Object rest; + + LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))) + { + Lisp_Object value = XCAR (rest); + /* Make sure that the subwindow is unmapped so that window + deletion will not try and do it again. */ + unmap_subwindow (value); + XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)) + = delq_no_quit (value, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f))); + } +} + /***************************************************************************** * subwindow exposure ignorance * *****************************************************************************/ Index: src/glyphs.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs.h,v retrieving revision 1.18.2.46 diff -u -r1.18.2.46 glyphs.h --- src/glyphs.h 2000/05/03 14:47:10 1.18.2.46 +++ src/glyphs.h 2000/05/09 11:23:15 @@ -1055,6 +1055,7 @@ Lisp_Object image_instance_parent_glyph (struct Lisp_Image_Instance*); int image_instance_changed (Lisp_Object image); void free_frame_subwindow_instance_cache (struct frame* f); +void reset_frame_subwindow_instance_cache (struct frame* f); struct expose_ignore { Index: src/window.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/window.c,v retrieving revision 1.41.2.49 diff -u -r1.41.2.49 window.c --- src/window.c 2000/05/05 19:43:41 1.41.2.49 +++ src/window.c 2000/05/09 11:23:34 @@ -5212,6 +5212,11 @@ mark_windows_in_use (f, 1); + /* Force subwindows to be reinstantiated. They are all going + anyway and if we don't do this GC may not happen between now + and the next time we check their integrity. */ + reset_frame_subwindow_instance_cache (f); + #if 0 /* JV: This is bogus, First of all, the units are inconsistent. The frame sizes are measured @@ -5354,6 +5359,13 @@ w->hscroll = p->hscroll; w->modeline_hscroll = p->modeline_hscroll; w->line_cache_last_updated = Qzero; + /* The subwindow instance cache isn't preserved across + window configurations, and in fact doing so would be + wrong. We just reset to zero and then redisplay will fill + it up as needed. */ + w->subwindow_instance_cache = make_lisp_hash_table (30, + HASH_TABLE_KEY_WEAK, + HASH_TABLE_EQ); SET_LAST_MODIFIED (w, 1); SET_LAST_FACECHANGE (w); w->config_mark = 0;