[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tooltip frame uses (class mono) when processing defface specs
From: |
John Paul Wallington |
Subject: |
Re: tooltip frame uses (class mono) when processing defface specs |
Date: |
Sun, 07 Oct 2007 17:42:51 +0100 |
User-agent: |
Microsoft Gnus Express, Build 511.230502 |
Richard Stallman <address@hidden> writes:
> [I sent this message twice but did not get a response.]
>
> > When processing defface specs, the tooltip frame uses alternatives
> > that select the characteristic (class mono). Alternatives that select
> > (class color) or (class grayscale) are not used.
>
> FWIW, (class mono) isn't selected either.
>
> Can someone please debug this, then ack?
How about the following fix ?
2007-10-07 John Paul Wallington <address@hidden>
* xfns.c (x_create_tip_frame): Set the `display-type' frame
parameter before setting up faces.
--- xfns.c 20 Sep 2007 22:18:47 +0100 1.691
+++ xfns.c 07 Oct 2007 17:26:40 +0100
@@ -4946,7 +4946,23 @@
if (NILP (Fframe_parameter (frame, intern ("tooltip"))))
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.