diff options
| author | Eli Zaretskii | 1999-08-10 10:38:37 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 1999-08-10 10:38:37 +0000 |
| commit | 1697ca3831112a5aa282ecbc1fd59d9bf4ab7867 (patch) | |
| tree | 92cf1bb834e675ce1eacc1637ad8df189cfd8cca /src | |
| parent | 6821243b5fcf462f520d69e4b794e44fb00f1837 (diff) | |
| download | emacs-1697ca3831112a5aa282ecbc1fd59d9bf4ab7867.tar.gz emacs-1697ca3831112a5aa282ecbc1fd59d9bf4ab7867.zip | |
(realize_default_face) [MSDOS]: Don't take default
colors from the frame here.
(realize_tty_face) [MSDOS]: Do it here. Update the face
attributes with the actual name of the color taken from the
frame.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 6b2f759175d..aa74650aa1d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5273,18 +5273,6 @@ realize_default_face (f) | |||
| 5273 | bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs); | 5273 | bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs); |
| 5274 | face = realize_face (c, attrs, CHARSET_ASCII); | 5274 | face = realize_face (c, attrs, CHARSET_ASCII); |
| 5275 | 5275 | ||
| 5276 | #ifdef MSDOS | ||
| 5277 | /* If either of the colors of the default face is the default color, | ||
| 5278 | use the color defined by the frame. */ | ||
| 5279 | if (FRAME_MSDOS_P (f)) | ||
| 5280 | { | ||
| 5281 | if (face->foreground == FACE_TTY_DEFAULT_COLOR) | ||
| 5282 | face->foreground = FRAME_FOREGROUND_PIXEL (f); | ||
| 5283 | if (face->background == FACE_TTY_DEFAULT_COLOR) | ||
| 5284 | face->background = FRAME_BACKGROUND_PIXEL (f); | ||
| 5285 | } | ||
| 5286 | #endif | ||
| 5287 | |||
| 5288 | /* Remove the former default face. */ | 5276 | /* Remove the former default face. */ |
| 5289 | if (c->used > DEFAULT_FACE_ID) | 5277 | if (c->used > DEFAULT_FACE_ID) |
| 5290 | { | 5278 | { |
| @@ -5661,9 +5649,19 @@ realize_tty_face (c, attrs, charset) | |||
| 5661 | 5649 | ||
| 5662 | #ifdef MSDOS | 5650 | #ifdef MSDOS |
| 5663 | if (FRAME_MSDOS_P (c->f) && face->foreground == FACE_TTY_DEFAULT_COLOR) | 5651 | if (FRAME_MSDOS_P (c->f) && face->foreground == FACE_TTY_DEFAULT_COLOR) |
| 5664 | face->foreground = load_color (c->f, face, | 5652 | { |
| 5665 | attrs[LFACE_FOREGROUND_INDEX], | 5653 | face->foreground = load_color (c->f, face, |
| 5666 | LFACE_FOREGROUND_INDEX); | 5654 | attrs[LFACE_FOREGROUND_INDEX], |
| 5655 | LFACE_FOREGROUND_INDEX); | ||
| 5656 | /* If the foreground of the default face is the default color, | ||
| 5657 | use the foreground color defined by the frame. */ | ||
| 5658 | if (face->foreground == FACE_TTY_DEFAULT_COLOR) | ||
| 5659 | { | ||
| 5660 | face->foreground = FRAME_FOREGROUND_PIXEL (f); | ||
| 5661 | attrs[LFACE_FOREGROUND_INDEX] = | ||
| 5662 | build_string (msdos_stdcolor_name (face->foreground)); | ||
| 5663 | } | ||
| 5664 | } | ||
| 5667 | #endif | 5665 | #endif |
| 5668 | 5666 | ||
| 5669 | color = attrs[LFACE_BACKGROUND_INDEX]; | 5667 | color = attrs[LFACE_BACKGROUND_INDEX]; |
| @@ -5674,9 +5672,19 @@ realize_tty_face (c, attrs, charset) | |||
| 5674 | 5672 | ||
| 5675 | #ifdef MSDOS | 5673 | #ifdef MSDOS |
| 5676 | if (FRAME_MSDOS_P (c->f) && face->background == FACE_TTY_DEFAULT_COLOR) | 5674 | if (FRAME_MSDOS_P (c->f) && face->background == FACE_TTY_DEFAULT_COLOR) |
| 5677 | face->background = load_color (c->f, face, | 5675 | { |
| 5678 | attrs[LFACE_BACKGROUND_INDEX], | 5676 | face->background = load_color (c->f, face, |
| 5679 | LFACE_BACKGROUND_INDEX); | 5677 | attrs[LFACE_BACKGROUND_INDEX], |
| 5678 | LFACE_BACKGROUND_INDEX); | ||
| 5679 | /* If the background of the default face is the default color, | ||
| 5680 | use the background color defined by the frame. */ | ||
| 5681 | if (face->background == FACE_TTY_DEFAULT_COLOR) | ||
| 5682 | { | ||
| 5683 | face->background = FRAME_BACKGROUND_PIXEL (f); | ||
| 5684 | attrs[LFACE_BACKGROUND_INDEX] = | ||
| 5685 | build_string (msdos_stdcolor_name (face->background)); | ||
| 5686 | } | ||
| 5687 | } | ||
| 5680 | 5688 | ||
| 5681 | /* Swap colors if face is inverse-video. */ | 5689 | /* Swap colors if face is inverse-video. */ |
| 5682 | if (face->tty_reverse_p) | 5690 | if (face->tty_reverse_p) |