Mercurial > emacs
changeset 79076:9dd45fcaa2f0
John Paul Wallington <jpw at pobox.com>
(x_create_tip_frame): Set the `display-type' frame parameter before
setting up faces.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 14 Oct 2007 02:45:48 +0000 |
parents | 09d05dfae11d |
children | 6cc5982c9202 |
files | src/xfns.c |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Sat Oct 13 20:20:14 2007 +0000 +++ b/src/xfns.c Sun Oct 14 02:45:48 2007 +0000 @@ -4927,6 +4927,23 @@ 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.