From: jpw@pobox.com (John Paul Wallington)
To: rms@gnu.org
Cc: emacs-devel@gnu.org, bojohan+news@dd.chalmers.se
Subject: Re: tooltip frame uses (class mono) when processing defface specs
Date: Sun, 07 Oct 2007 17:42:51 +0100 [thread overview]
Message-ID: <87sl4mx4dw.fsf@laptop.shootybangbang.com> (raw)
In-Reply-To: <E1IeVuL-0007oF-Qm@fencepost.gnu.org> (Richard Stallman's message of "Sun\, 07 Oct 2007 09\:10\:57 -0400")
Richard Stallman <rms@gnu.org> 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 <jpw@pobox.com>
* 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.
next prev parent reply other threads:[~2007-10-07 16:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 11:10 tooltip frame uses (class mono) when processing defface specs Joe Wells
2007-09-19 11:23 ` Joe Wells
2007-09-20 16:35 ` Richard Stallman
2007-09-20 17:32 ` Joe Wells
2007-09-20 18:14 ` Johan Bockgård
2007-09-20 21:31 ` Joe Wells
2007-09-21 22:32 ` Richard Stallman
2007-09-29 16:11 ` Richard Stallman
2007-10-07 13:10 ` Richard Stallman
2007-10-07 16:42 ` John Paul Wallington [this message]
2007-10-08 18:10 ` Glenn Morris
2007-10-09 1:14 ` Richard Stallman
2007-10-12 1:26 ` Glenn Morris
2007-10-12 15:59 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sl4mx4dw.fsf@laptop.shootybangbang.com \
--to=jpw@pobox.com \
--cc=bojohan+news@dd.chalmers.se \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.