From: Eli Zaretskii Date: Thu, 7 Sep 2000 17:12:48 +0000 (+0000) Subject: (make_terminal_frame): Initialize frame foreground and X-Git-Tag: emacs-pretest-21.0.90~1721 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65606f5ea1de3bea4e6d417e0fbb0be6fd847ba9;p=emacs.git (make_terminal_frame): Initialize frame foreground and background colors to unspecified, for the initial instance of an MSDOS frame. --- diff --git a/src/frame.c b/src/frame.c index ee725c837ce..6c737eeaefb 100644 --- a/src/frame.c +++ b/src/frame.c @@ -561,7 +561,23 @@ make_terminal_frame () 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