* src/nsterm.m (EmacsScroller.mark, mark_nsterm): New functions.
* src/nsterm.h (EmacsScroller.mark, mark_nsterm): Declare.
* src/alloc.c (garbage_collect) [MAVE_NS]: Call mark_nsterm.
(Bug#56095)
(cherry picked from commit
5f1bd872478927ad4bc635502e74628d39885286)
mark_fringe_data ();
#endif
+
+#ifdef HAVE_NS
+ mark_nsterm ();
+#endif
+
/* Everything is now marked, except for the data in font caches,
undo lists, and finalizers. The first two are compacted by
removing an items which aren't reachable otherwise. */
int em_whole;
}
+- (void) mark;
- (instancetype) initFrame: (NSRect )r window: (Lisp_Object)win;
- (void)setFrame: (NSRect)r;
#define NSControlStateValueOff NSOffState
#define NSBezelStyleRounded NSRoundedBezelStyle
#endif
+
+extern void mark_nsterm (void);
+
#endif /* HAVE_NS */
return ret;
}
+- (void) mark
+{
+ if (window)
+ {
+ Lisp_Object win;
+ XSETWINDOW (win, window);
+ mark_object (win);
+ }
+}
+
- (void)resetCursorRects
{
return ret;
}
+void
+mark_nsterm (void)
+{
+ NSTRACE ("mark_nsterm");
+ Lisp_Object tail, frame;
+ FOR_EACH_FRAME (tail, frame)
+ {
+ struct frame *f = XFRAME (frame);
+ if (FRAME_NS_P (f))
+ {
+ NSArray *subviews = [[FRAME_NS_VIEW (f) superview] subviews];
+ for (int i = [subviews count] - 1; i >= 0; --i)
+ {
+ id scroller = [subviews objectAtIndex: i];
+ if ([scroller isKindOfClass: [EmacsScroller class]])
+ [scroller mark];
+ }
+ }
+ }
+}
void
syms_of_nsterm (void)