XEmacs 21.2.30 "Hygeia".
[chise/xemacs-chise.git.1] / src / gutter.c
index f9d884f..d0055c7 100644 (file)
@@ -222,13 +222,18 @@ output_gutter (struct frame *f, enum gutter_pos pos)
   struct device *d = XDEVICE (f->device);
   struct window* w = XWINDOW (window);
   int x, y, width, height, ypos;
-  int line;
-  int border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos);
-  face_index findex = get_builtin_face_cache_index (w, Vgui_element_face);
+  int line, border_width;
+  face_index findex;
   display_line_dynarr* ddla, *cdla;
   struct display_line *dl;
   int cdla_len;
 
+  if (!WINDOW_LIVE_P (w))
+    return;
+
+  border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos);
+  findex = get_builtin_face_cache_index (w, Vgui_element_face);
+
   if (!f->current_display_lines)
     f->current_display_lines = Dynarr_new (display_line);
   if (!f->desired_display_lines)
@@ -332,6 +337,22 @@ clear_gutter (struct frame *f, enum gutter_pos pos)
   redisplay_clear_region (window, findex, x, y, width, height);
 }
 
+/* #### I don't currently believe that redisplay needs to mark the
+   glyphs in its structures since these will always be referenced from
+   somewhere else. However, I'm not sure enough to stake my life on it
+   at this point, so we do the safe thing. */
+
+/* See the comment in image_instantiate_cache_result as to why marking
+   the glyph will also mark the image_instance. */
+void
+mark_gutters (struct frame* f)
+{
+  if (f->current_display_lines)
+    mark_redisplay_structs (f->current_display_lines);
+  if (f->desired_display_lines)
+    mark_redisplay_structs (f->desired_display_lines);
+}
+
 void
 update_frame_gutters (struct frame *f)
 {
@@ -984,6 +1005,7 @@ See `default-gutter-height' for more information.
   fb = Fcons (Fcons (list1 (Qx), Qautodetect), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+  fb = Fcons (Fcons (list1 (Qmsprinter), Qautodetect), fb);
   fb = Fcons (Fcons (list1 (Qmswindows), Qautodetect), fb);
 #endif
   if (!NILP (fb))
@@ -997,6 +1019,7 @@ See `default-gutter-height' for more information.
   fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_WIDTH)), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+  fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
   fb = Fcons (Fcons (list1 (Qmswindows), 
                     make_int (DEFAULT_GUTTER_WIDTH)), fb);
 #endif
@@ -1093,6 +1116,7 @@ See `default-gutter-height' for more information.
   fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
 #endif
 #ifdef HAVE_MS_WINDOWS
+  fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
   fb = Fcons (Fcons (list1 (Qmswindows), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
 #endif
   if (!NILP (fb))
@@ -1191,5 +1215,4 @@ See `default-gutter-visible-p' for more information.
   set_specifier_fallback (Vgutter_visible_p[BOTTOM_GUTTER], fb);
   set_specifier_fallback (Vgutter_visible_p[LEFT_GUTTER],   fb);
   set_specifier_fallback (Vgutter_visible_p[RIGHT_GUTTER],  fb);
-
 }