diff src/dispnew.c @ 1821:04fb1d3d6992

JimB's changes since January 18th
author Jim Blandy <jimb@redhat.com>
date Tue, 26 Jan 1993 01:58:16 +0000
parents 4e554ea437ed
children 23ab36427257
line wrap: on
line diff
--- a/src/dispnew.c	Tue Jan 26 01:56:29 1993 +0000
+++ b/src/dispnew.c	Tue Jan 26 01:58:16 1993 +0000
@@ -173,7 +173,22 @@
   for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
     {
       frame = XCONS (tail)->car;
-      if (FRAME_VISIBLE_P (XFRAME (frame)))
+
+      /* If we simply redrew all visible frames, whether or not they
+	 were garbaged, then this would make all frames clear and
+	 redraw whenever a new frame is created or an existing frame
+	 is de-iconified; those events set the global frame_garbaged
+	 flag, to which redisplay responds by calling this function.
+
+	 This used to redraw all visible frames; the only advantage of
+	 that approach is that if a frame changes from invisible to
+	 visible without setting its garbaged flag, it still gets
+	 redisplayed.  But that should never happen; since invisible
+	 frames are not updated, they should always be marked as
+	 garbaged when they become visible again.  If that doesn't
+	 happen, it's a bug in the visibility code, not a bug here.  */
+      if (FRAME_VISIBLE_P (XFRAME (frame))
+	  && FRAME_GARBAGED_P (XFRAME (frame)))
 	Fredraw_frame (frame);
     }
   return Qnil;