[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macfns.c,v
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/src/macfns.c,v |
Date: |
Fri, 16 Jun 2006 08:08:49 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: YAMAMOTO Mitsuharu <mituharu> 06/06/16 08:08:49
Index: macfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macfns.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- macfns.c 3 Jun 2006 02:32:42 -0000 1.88
+++ macfns.c 16 Jun 2006 08:08:49 -0000 1.89
@@ -3070,11 +3070,20 @@
(display)
Lisp_Object display;
{
- /* MAC_TODO: this is an approximation, and only of the main display */
-
struct mac_display_info *dpyinfo = check_x_display_info (display);
+ /* Only of the main display. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ CGSize size;
+
+ BLOCK_INPUT;
+ size = CGDisplayScreenSize (kCGDirectMainDisplay);
+ UNBLOCK_INPUT;
+ return make_number ((int) (size.height + .5f));
+#else
+ /* This is an approximation. */
return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
+#endif
}
DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
@@ -3085,11 +3094,20 @@
(display)
Lisp_Object display;
{
- /* MAC_TODO: this is an approximation, and only of the main display */
-
struct mac_display_info *dpyinfo = check_x_display_info (display);
+ /* Only of the main display. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ CGSize size;
+
+ BLOCK_INPUT;
+ size = CGDisplayScreenSize (kCGDirectMainDisplay);
+ UNBLOCK_INPUT;
+ return make_number ((int) (size.width + .5f));
+#else
+ /* This is an approximation. */
return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
+#endif
}
DEFUN ("x-display-backing-store", Fx_display_backing_store,
- [Emacs-diffs] Changes to emacs/src/macfns.c,v,
YAMAMOTO Mitsuharu <=