emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xfns.c,v [EMACS_22_BASE]


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/src/xfns.c,v [EMACS_22_BASE]
Date: Sun, 14 Oct 2007 02:45:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Glenn Morris <gm>       07/10/14 02:45:48

Index: xfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/xfns.c,v
retrieving revision 1.681.2.5
retrieving revision 1.681.2.6
diff -u -b -r1.681.2.5 -r1.681.2.6
--- xfns.c      12 Oct 2007 08:49:20 -0000      1.681.2.5
+++ xfns.c      14 Oct 2007 02:45:48 -0000      1.681.2.6
@@ -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.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]