[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macterm.c,v
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/src/macterm.c,v |
Date: |
Mon, 26 Mar 2007 08:13:27 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: YAMAMOTO Mitsuharu <mituharu> 07/03/26 08:13:27
Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -b -r1.211 -r1.212
--- macterm.c 18 Mar 2007 08:06:38 -0000 1.211
+++ macterm.c 26 Mar 2007 08:13:27 -0000 1.212
@@ -7172,11 +7172,14 @@
Lisp_Object existing_info;
if (!(CONSP (charset_info)
- && STRINGP (charset = XCAR (charset_info))
+ && (charset = XCAR (charset_info),
+ STRINGP (charset))
&& CONSP (XCDR (charset_info))
- && INTEGERP (text_encoding = XCAR (XCDR (charset_info)))
+ && (text_encoding = XCAR (XCDR (charset_info)),
+ INTEGERP (text_encoding))
&& CONSP (XCDR (XCDR (charset_info)))
- && SYMBOLP (coding_system = XCAR (XCDR (XCDR (charset_info))))))
+ && (coding_system = XCAR (XCDR (XCDR (charset_info))),
+ SYMBOLP (coding_system))))
continue;
existing_info = assq_no_quit (text_encoding, result);
@@ -11538,8 +11541,32 @@
but this may not be what is actually used. Mac OSX can do better. */
dpyinfo->color_p = CGDisplaySamplesPerPixel (kCGDirectMainDisplay) > 1;
dpyinfo->n_planes = CGDisplayBitsPerPixel (kCGDirectMainDisplay);
+ {
+ CGDisplayErr err;
+ CGDisplayCount ndisps;
+ CGDirectDisplayID *displays;
+
+ err = CGGetActiveDisplayList (0, NULL, &ndisps);
+ if (err == noErr)
+ {
+ displays = alloca (sizeof (CGDirectDisplayID) * ndisps);
+ err = CGGetActiveDisplayList (ndisps, displays, &ndisps);
+ }
+ if (err == noErr)
+ {
+ CGRect bounds = CGRectMake (0, 0, 0, 0);
+
+ while (ndisps-- > 0)
+ bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps]));
+ dpyinfo->height = CGRectGetHeight (bounds);
+ dpyinfo->width = CGRectGetWidth (bounds);
+ }
+ else
+ {
dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay);
dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay);
+ }
+ }
#else
{
GDHandle main_device_handle = LMGetMainDevice();
- [Emacs-diffs] Changes to emacs/src/macterm.c,v, YAMAMOTO Mitsuharu, 2007/03/05
- [Emacs-diffs] Changes to emacs/src/macterm.c,v, YAMAMOTO Mitsuharu, 2007/03/07
- [Emacs-diffs] Changes to emacs/src/macterm.c,v, YAMAMOTO Mitsuharu, 2007/03/10
- [Emacs-diffs] Changes to emacs/src/macterm.c,v, YAMAMOTO Mitsuharu, 2007/03/18
- [Emacs-diffs] Changes to emacs/src/macterm.c,v,
YAMAMOTO Mitsuharu <=