# HG changeset patch # User Gerd Moellmann # Date 980346108 0 # Node ID 0bd627ce1af8f6c07d64be5f33796177f8b73b8b # Parent 5426c6545b7f8a173207577116e438b5999212f5 (x_create_tip_frame): Prevent changing the tooltip's background color by specifying a color for the default font in .Xdefaults. diff -r 5426c6545b7f -r 0bd627ce1af8 src/xfns.c --- a/src/xfns.c Wed Jan 24 14:21:11 2001 +0000 +++ b/src/xfns.c Wed Jan 24 14:21:48 2001 +0000 @@ -10630,11 +10630,24 @@ change_frame_size (f, height, width, 1, 0, 0); /* Set up faces after all frame parameters are known. This call - also merges in face attributes specified for new frames. If we - don't do this, the `menu' face for instance won't have the right - colors, and the menu bar won't appear in the specified colors for - new frames. */ - call1 (Qface_set_after_frame_default, frame); + also merges in face attributes specified for new frames. + + Frame parameters may be changed if .Xdefaults contains + specifications for the default font. For example, if there is an + `Emacs.default.attributeBackground: pink', the `background-color' + attribute of the frame get's set, which let's the internal border + of the tooltip frame appear in pink. Prevent this. */ + { + Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); + + /* Set tip_frame here, so that */ + tip_frame = frame; + call1 (Qface_set_after_frame_default, frame); + + if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) + Fmodify_frame_parameters (frame, Fcons (Fcons (Qbackground_color, bg), + Qnil)); + } f->no_split = 1; @@ -10644,7 +10657,6 @@ below. And the frame needs to be on Vframe_list or making it visible won't work. */ Vframe_list = Fcons (frame, Vframe_list); - tip_frame = frame; /* Now that the frame is official, it counts as a reference to its display. */