aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frame.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index 6c737eeaefb..fee69fd5a21 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2133,7 +2133,29 @@ If FRAME is nil, describe the currently selected frame.")
2133 { 2133 {
2134 value = Fassq (parameter, f->param_alist); 2134 value = Fassq (parameter, f->param_alist);
2135 if (CONSP (value)) 2135 if (CONSP (value))
2136 value = XCDR (value); 2136 {
2137 extern char unspecified_fg[], unspecified_bg[];
2138 extern Lisp_Object Qbackground_color, Qforeground_color;
2139
2140 value = XCDR (value);
2141 /* Fframe_parameters puts the actual fg/bg color names,
2142 even if f->param_alist says otherwise. This is
2143 important when param_alist's notion of colors is
2144 "unspecified". We need to do the same here. */
2145 if (STRINGP (value) && !FRAME_WINDOW_P (f))
2146 {
2147 if (EQ (parameter, Qbackground_color)
2148 && strncmp (XSTRING (value)->data,
2149 unspecified_bg,
2150 XSTRING (value)->size) == 0)
2151 value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f));
2152 else if (EQ (parameter, Qforeground_color)
2153 && strncmp (XSTRING (value)->data,
2154 unspecified_fg,
2155 XSTRING (value)->size) == 0)
2156 value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f));
2157 }
2158 }
2137 else if (EQ (parameter, Qdisplay_type) 2159 else if (EQ (parameter, Qdisplay_type)
2138 || EQ (parameter, Qbackground_mode)) 2160 || EQ (parameter, Qbackground_mode))
2139 /* Avoid consing in frequent cases. */ 2161 /* Avoid consing in frequent cases. */