From 1ee27840beabbee6ff0f340bf509bee09f7d70be Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 18 Sep 2008 18:20:06 +0000 Subject: [PATCH] (x_display_pixel_height, x_display_pixel_width): New functions. (ns_initialize_display_info): Omit removed members of ns_display_info. --- src/nsterm.m | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 8336a163f53..651b400d8bf 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3503,6 +3503,23 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y) ========================================================================== */ +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 @@ ns_initialize_display_info (struct ns_display_info *dpyinfo) 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: -- 2.39.5