comparison src/macterm.c @ 83171:09bbf2fc80da

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-439 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-440 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-441 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-442 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-443 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-444 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-445 Tweak permissions * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-446 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-211
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 10 Jul 2004 14:37:36 +0000
parents e8df1878cfd1 550df8e67006
children e657dca8261e
comparison
equal deleted inserted replaced
83170:952f7cc8274d 83171:09bbf2fc80da
8852 dpyinfo->resx = 75.0; 8852 dpyinfo->resx = 75.0;
8853 dpyinfo->resy = 75.0; 8853 dpyinfo->resy = 75.0;
8854 dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); 8854 dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);
8855 #ifdef MAC_OSX 8855 #ifdef MAC_OSX
8856 /* HasDepth returns true if it is possible to have a 32 bit display, 8856 /* HasDepth returns true if it is possible to have a 32 bit display,
8857 but this may not be what is actually used. Mac OSX can do better. */ 8857 but this may not be what is actually used. Mac OSX can do better.
8858 dpyinfo->n_planes = CGDisplayBitsPerPixel (CGMainDisplayID ()); 8858 CGMainDisplayID is only available on OSX 10.2 and higher, but the
8859 header for CGGetActiveDisplayList says that the first display returned
8860 is the active one, so we use that. */
8861 {
8862 CGDirectDisplayID disp_id[1];
8863 CGDisplayCount disp_count;
8864 CGDisplayErr error_code;
8865
8866 error_code = CGGetActiveDisplayList (1, disp_id, &disp_count);
8867 if (error_code != 0)
8868 error ("No display found, CGGetActiveDisplayList error %d", error_code);
8869
8870 dpyinfo->n_planes = CGDisplayBitsPerPixel (disp_id[0]);
8871 }
8859 #else 8872 #else
8860 for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1) 8873 for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1)
8861 if (HasDepth (main_device_handle, dpyinfo->n_planes, 8874 if (HasDepth (main_device_handle, dpyinfo->n_planes,
8862 gdDevType, dpyinfo->color_p)) 8875 gdDevType, dpyinfo->color_p))
8863 break; 8876 break;