From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jpw@pobox.com (John Paul Wallington) Newsgroups: gmane.emacs.devel Subject: Re: tooltip frame uses (class mono) when processing defface specs Date: Sun, 07 Oct 2007 17:42:51 +0100 Message-ID: <87sl4mx4dw.fsf@laptop.shootybangbang.com> References: <863axadi7d.fsf@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1191775403 16031 80.91.229.12 (7 Oct 2007 16:43:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2007 16:43:23 +0000 (UTC) Cc: emacs-devel@gnu.org, bojohan+news@dd.chalmers.se To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 07 18:43:20 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IeZDr-0006Pm-0m for ged-emacs-devel@m.gmane.org; Sun, 07 Oct 2007 18:43:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeZDl-00026A-MG for ged-emacs-devel@m.gmane.org; Sun, 07 Oct 2007 12:43:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IeZDi-00023o-Fd for emacs-devel@gnu.org; Sun, 07 Oct 2007 12:43:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IeZDe-000209-UH for emacs-devel@gnu.org; Sun, 07 Oct 2007 12:43:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeZDe-0001zy-PD for emacs-devel@gnu.org; Sun, 07 Oct 2007 12:43:06 -0400 Original-Received: from sceptre.pobox.com ([207.106.133.20]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IeZDa-0000ec-96; Sun, 07 Oct 2007 12:43:02 -0400 Original-Received: from sceptre (localhost.localdomain [127.0.0.1]) by sceptre.pobox.com (Postfix) with ESMTP id 50EA72FC; Sun, 7 Oct 2007 12:43:18 -0400 (EDT) Original-Received: from laptop.shootybangbang.com (host86-132-149-170.range86-132.btcentralplus.com [86.132.149.170]) by sceptre.sasl.smtp.pobox.com (Postfix) with ESMTP id 19AF587784; Sun, 7 Oct 2007 12:43:14 -0400 (EDT) X-URL: http://www.shootybangbang.com/ X-Mailer: Norman X-Attribution: JPW X-NSA-Fodder: weapons of mass destruction industrial intelligence emc Kennedy X-Face: #uahb@^mo@bA"{q'"a4y[w$n3/V:haD\; YenWcT7)kXYx3/>#[DD9ExVe}; 9FG6X`l!Dm"V peub=u!&&?}s~{TOPtGdH)KA}/qCr; d"Gr*'9_V1PE@+K'tk2/Iq@PBKtJ+]&,CP9_Fl8'*R]LCR0| 6q; Xey'`:DX+)S.]p[KP^sNe`8B\W6(Nw{o5i)y+I!h=0bU5L`Tj`~Q0!G"t(s7o7eh)J\>P>,!~/w $$jGEVa%H%8(jTv In-Reply-To: (Richard Stallman's message of "Sun\, 07 Oct 2007 09\:10\:57 -0400") User-Agent: Microsoft Gnus Express, Build 511.230502 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80385 Archived-At: Richard Stallman 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 * 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.