changeset 31470:2e399023961d

(make_terminal_frame): Initialize frame foreground and background colors to unspecified, for the initial instance of an MSDOS frame.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 07 Sep 2000 17:12:48 +0000
parents 3e89159397e4
children 84f6fc78ec6d
files src/frame.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Thu Sep 07 16:10:38 2000 +0000
+++ b/src/frame.c	Thu Sep 07 17:12:48 2000 +0000
@@ -561,7 +561,23 @@
   if (!inhibit_window_system
       && (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame))
 	  || XFRAME (selected_frame)->output_method == output_msdos_raw))
-    f->output_method = output_msdos_raw;
+    {
+      f->output_method = output_msdos_raw;
+      /* This initialization of foreground and background pixels is
+	 only important for the initial frame created in temacs.  If
+	 we don't do that, we get black background and foreground in
+	 the dumped Emacs because the_only_x_display is a static
+	 variable, hence it is born all-zeroes, and zero is the code
+	 for the black color.  Other frames all inherit their pixels
+	 from what's already in the_only_x_display.  */
+      if ((!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
+	  && f->output_data.x->background_pixel == 0
+	  && f->output_data.x->foreground_pixel == 0)
+	{
+	  f->output_data.x->background_pixel = FACE_TTY_DEFAULT_BG_COLOR;
+	  f->output_data.x->foreground_pixel = FACE_TTY_DEFAULT_FG_COLOR;
+	}
+    }
   else
     f->output_method = output_termcap;
 #else