X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fframe.c;h=bd85ae4e74b85de44db92cf8cfa58560e0cb6afb;hb=eea9306cd823bc2679588c209015eba3098be0ec;hp=38c8cc3f79e1981dd11aac9da87b6eff4fe2c79c;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git diff --git a/src/frame.c b/src/frame.c index 38c8cc3..bd85ae4 100644 --- a/src/frame.c +++ b/src/frame.c @@ -128,6 +128,8 @@ mark_frame (Lisp_Object obj, void (*markobj) (Lisp_Object)) #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)); @@ -173,7 +175,7 @@ allocate_frame_core (Lisp_Object device) /* This function can GC */ Lisp_Object frame; Lisp_Object root_window; - struct frame *f = alloc_lcrecord_type (struct frame, lrecord_frame); + struct frame *f = alloc_lcrecord_type (struct frame, &lrecord_frame); zero_lcrecord (f); nuke_all_frame_slots (f); @@ -203,6 +205,9 @@ allocate_frame_core (Lisp_Object device) 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 @@ See `set-frame-properties', `default-x-frame-plist', and 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_frame_internal (struct frame *f, int force, 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. */ @@ -1826,7 +1838,7 @@ Note also: Warping the mouse is contrary to the ICCCM, so be very sure struct window *w; int pix_x, pix_y; - CHECK_WINDOW (window); + CHECK_LIVE_WINDOW (window); CHECK_INT (x); CHECK_INT (y); @@ -1850,7 +1862,7 @@ before calling this function on it, like this. { struct window *w; - CHECK_WINDOW (window); + CHECK_LIVE_WINDOW (window); CHECK_INT (x); CHECK_INT (y);