From: Glenn Morris Date: Sun, 14 Oct 2007 02:46:53 +0000 (+0000) Subject: John Paul Wallington X-Git-Tag: emacs-pretest-23.0.90~10339 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35fdaa62d7fd33543b1641ca7276bd1abdbf9a50;p=emacs.git John Paul Wallington (x_create_tip_frame): Set the `display-type' frame parameter before setting up faces. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3d8e6307f42..56bc1228f0d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,11 @@ +2007-10-07 John Paul Wallington + + * xfns.c (x_create_tip_frame): Set the `display-type' frame + parameter before setting up faces. + 2007-10-13 Eli Zaretskii - * ccl.c (Fregister_code_conversion_map): + * ccl.c (Fregister_code_conversion_map): * keyboard.c (append_tool_bar_item): Reformat last change. * lisp.h (eabs): Rename from `abs'. All callers changed. @@ -13,9 +18,9 @@ * keyboard.c (GROW_RAW_KEYBUF, menu_bar_items, menu_bar_item) (append_tool_bar_item): * macmenu.c (grow_menu_items): - * w32menu.c (grow_menu_items): + * w32menu.c (grow_menu_items): * xmenu.c (grow_menu_items): Use larger_vector. - + 2007-10-13 Eli Zaretskii * msdos.c (dos_rawgetc): Undo last change (there's no ``leaving diff --git a/src/xfns.c b/src/xfns.c index 764cbbafa77..e3ce2220e73 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4947,6 +4947,23 @@ x_create_tip_frame (dpyinfo, parms, text) Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), Qnil)); + /* Set the `display-type' frame parameter before setting up faces. */ + { + Lisp_Object disptype; + + if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1) + disptype = intern ("mono"); + else if (FRAME_X_DISPLAY_INFO (f)->visual->class == GrayScale || + FRAME_X_DISPLAY_INFO (f)->visual->class == StaticGray) + disptype = intern ("grayscale"); + else + disptype = intern ("color"); + + if (NILP (Fframe_parameter (frame, Qdisplay_type))) + Fmodify_frame_parameters (frame, Fcons (Fcons (Qdisplay_type, disptype), + Qnil)); + } + /* Set up faces after all frame parameters are known. This call also merges in face attributes specified for new frames.