Mercurial > emacs
diff src/w32fns.c @ 99235:eccf5258acaf
* w32fns.c (x_create_tip_frame): Prevent default foreground color for
new frames overriding foreground for tooltips. Based on similar patch
from Martin Rudalics <rudalics@gmx.at>. (Bug#1032)
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 30 Oct 2008 01:27:06 +0000 |
parents | 06856faf917a |
children | 5111bebfbd1c |
line wrap: on
line diff
--- a/src/w32fns.c Wed Oct 29 21:42:37 2008 +0000 +++ b/src/w32fns.c Thu Oct 30 01:27:06 2008 +0000 @@ -4364,7 +4364,7 @@ x_default_parameter (f, parameters, Qborder_width, make_number (2), "borderWidth", "BorderWidth", RES_TYPE_NUMBER); - /* We recognize either internalBorderWidth or internalBorder + /* We recognize either internalBorderWidth or internalBorder (which is what xterm calls it). */ if (NILP (Fassq (Qinternal_border_width, parameters))) { @@ -5534,14 +5534,20 @@ of the tooltip frame appear in pink. Prevent this. */ { Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); + Lisp_Object fg = Fframe_parameter (frame, Qforeground_color); + Lisp_Object colors = Qnil; /* Set tip_frame here, so that */ tip_frame = frame; call2 (Qface_set_after_frame_default, frame, Qnil); if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) - Fmodify_frame_parameters (frame, Fcons (Fcons (Qbackground_color, bg), - Qnil)); + colors = Fcons (Fcons (Qbackground_color, bg), colors); + if (!EQ (fg, Fframe_parameter (frame, Qforeground_color))) + colors = Fcons (Fcons (Qforeground_color, fg), colors); + + if (!NILP (colors)) + Fmodify_frame_parameters (frame, colors); } f->no_split = 1;