changeset 98229:c3b661108b5c

(x_display_pixel_height, x_display_pixel_width): New functions. (ns_initialize_display_info): Omit removed members of ns_display_info.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 18 Sep 2008 18:20:06 +0000
parents 8adf9be2900c
children e37978ef9db9
files src/nsterm.m
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/nsterm.m	Thu Sep 18 18:18:43 2008 +0000
+++ b/src/nsterm.m	Thu Sep 18 18:20:06 2008 +0000
@@ -3503,6 +3503,23 @@
 
    ========================================================================== */
 
+int
+x_display_pixel_height (dpyinfo)
+     struct ns_display_info *dpyinfo;
+{
+  NSScreen *screen = [NSScreen mainScreen];
+  return [screen frame].size.height;
+}
+
+int
+x_display_pixel_width (dpyinfo)
+     struct ns_display_info *dpyinfo;
+{
+  NSScreen *screen = [NSScreen mainScreen];
+  return [screen frame].size.width;
+}
+
+
 static Lisp_Object ns_string_to_lispmod (const char *s)
 /* --------------------------------------------------------------------------
      Convert modifier name to lisp symbol
@@ -3602,8 +3619,6 @@
     NSScreen *screen = [NSScreen mainScreen];
     NSWindowDepth depth = [screen depth];
 
-    dpyinfo->width = [screen frame].size.width;
-    dpyinfo->height = [screen frame].size.height;
     dpyinfo->resx = 72.27; /* used 75.0, but this makes pt == pixel, expected */
     dpyinfo->resy = 72.27;
     dpyinfo->color_p = ![NSDeviceWhiteColorSpace isEqualToString: