diff src/macterm.c @ 83162:dbcd0af66869

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-409 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-410 Make sure image types are initialized for lookup too * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-412 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-413 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-414 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-415 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-417 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-418 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-419 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-202
author Karoly Lorentey <lorentey@elte.hu>
date Thu, 24 Jun 2004 07:44:13 +0000
parents 9fb10038ca55 5e784b2ea638
children e8df1878cfd1
line wrap: on
line diff
--- a/src/macterm.c	Tue Jun 15 18:46:31 2004 +0000
+++ b/src/macterm.c	Thu Jun 24 07:44:13 2004 +0000
@@ -8840,10 +8840,16 @@
   dpyinfo->resx = 75.0;
   dpyinfo->resy = 75.0;
   dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);
+#ifdef MAC_OSX
+  /* HasDepth returns true if it is possible to have a 32 bit display,
+     but this may not be what is actually used.  Mac OSX can do better.  */
+  dpyinfo->n_planes = CGDisplayBitsPerPixel (CGMainDisplayID ());
+#else
   for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1)
     if (HasDepth (main_device_handle, dpyinfo->n_planes,
 		  gdDevType, dpyinfo->color_p))
       break;
+#endif
   dpyinfo->height = (**main_device_handle).gdRect.bottom;
   dpyinfo->width = (**main_device_handle).gdRect.right;
   dpyinfo->grabbed = 0;