comparison src/frame.c @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents b8cc9ab3f761
children de805c49cfc1
comparison
equal deleted inserted replaced
407:ed6218a7d4d3 408:501cfd01ee6d
128 struct frame *f = XFRAME (obj); 128 struct frame *f = XFRAME (obj);
129 129
130 #define MARKED_SLOT(x) mark_object (f->x) 130 #define MARKED_SLOT(x) mark_object (f->x)
131 #include "frameslots.h" 131 #include "frameslots.h"
132 132
133 mark_subwindow_cachels (f->subwindow_cachels);
134
135 if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */ 133 if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */
136 MAYBE_FRAMEMETH (f, mark_frame, (f)); 134 MAYBE_FRAMEMETH (f, mark_frame, (f));
137 135
138 return Qnil; 136 return Qnil;
139 } 137 }
206 f->root_window = root_window; 204 f->root_window = root_window;
207 f->selected_window = root_window; 205 f->selected_window = root_window;
208 f->last_nonminibuf_window = root_window; 206 f->last_nonminibuf_window = root_window;
209 207
210 /* cache of subwindows visible on frame */ 208 /* cache of subwindows visible on frame */
211 f->subwindow_cachels = Dynarr_new (subwindow_cachel); 209 f->subwindow_instance_cache = make_weak_list (WEAK_LIST_SIMPLE);
212 210
213 /* associated exposure ignore list */ 211 /* associated exposure ignore list */
214 f->subwindow_exposures = 0; 212 f->subwindow_exposures = 0;
215 f->subwindow_exposures_tail = 0; 213 f->subwindow_exposures_tail = 0;
216 214
464 things. */ 462 things. */
465 init_frame_toolbars (f); 463 init_frame_toolbars (f);
466 #endif 464 #endif
467 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); 465 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
468 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); 466 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
469 reset_subwindow_cachels (f);
470 467
471 change_frame_size (f, f->height, f->width, 0); 468 change_frame_size (f, f->height, f->width, 0);
472 } 469 }
473 470
474 MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); 471 MAYBE_FRAMEMETH (f, init_frame_2, (f, props));
1551 #endif 1548 #endif
1552 #ifdef HAVE_TOOLBARS 1549 #ifdef HAVE_TOOLBARS
1553 free_frame_toolbars (f); 1550 free_frame_toolbars (f);
1554 #endif 1551 #endif
1555 free_frame_gutters (f); 1552 free_frame_gutters (f);
1553 /* Unfortunately deleting the frame will also delete the parent of
1554 all of the subwindow instances current on the frame. I think this
1555 can lead to bad things when trying to finalize the
1556 instances. Thus we loop over the instance cache calling the
1557 finalize method for each instance. */
1558 free_frame_subwindow_instance_cache (f);
1556 1559
1557 /* This must be done before the window and window_mirror structures 1560 /* This must be done before the window and window_mirror structures
1558 are freed. The scrollbar information is attached to them. */ 1561 are freed. The scrollbar information is attached to them. */
1559 MAYBE_FRAMEMETH (f, delete_frame, (f)); 1562 MAYBE_FRAMEMETH (f, delete_frame, (f));
1560 1563
1562 remove the reference to them. */ 1565 remove the reference to them. */
1563 delete_all_subwindows (XWINDOW (f->root_window)); 1566 delete_all_subwindows (XWINDOW (f->root_window));
1564 f->root_window = Qnil; 1567 f->root_window = Qnil;
1565 1568
1566 /* clear out the cached glyph information */ 1569 /* clear out the cached glyph information */
1567 if (f->subwindow_cachels) 1570 f->subwindow_instance_cache = Qnil;
1568 {
1569 Dynarr_free (f->subwindow_cachels);
1570 f->subwindow_cachels = 0;
1571 }
1572 1571
1573 /* Remove the frame now from the list. This way, any events generated 1572 /* Remove the frame now from the list. This way, any events generated
1574 on this frame by the maneuvers below will disperse themselves. */ 1573 on this frame by the maneuvers below will disperse themselves. */
1575 1574
1576 /* This used to be Fdelq(), but that will cause a seg fault if the 1575 /* This used to be Fdelq(), but that will cause a seg fault if the