aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-09-18 18:20:06 +0000
committerChong Yidong2008-09-18 18:20:06 +0000
commit1ee27840beabbee6ff0f340bf509bee09f7d70be (patch)
tree98efc2a0da22d79530592a3f5876759cde5e7e05
parentb532986efa10729b213c4e45c9b7d79854f7ce15 (diff)
downloademacs-1ee27840beabbee6ff0f340bf509bee09f7d70be.tar.gz
emacs-1ee27840beabbee6ff0f340bf509bee09f7d70be.zip
(x_display_pixel_height, x_display_pixel_width): New functions.
(ns_initialize_display_info): Omit removed members of ns_display_info.
-rw-r--r--src/nsterm.m19
1 files 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)
3503 3503
3504 ========================================================================== */ 3504 ========================================================================== */
3505 3505
3506int
3507x_display_pixel_height (dpyinfo)
3508 struct ns_display_info *dpyinfo;
3509{
3510 NSScreen *screen = [NSScreen mainScreen];
3511 return [screen frame].size.height;
3512}
3513
3514int
3515x_display_pixel_width (dpyinfo)
3516 struct ns_display_info *dpyinfo;
3517{
3518 NSScreen *screen = [NSScreen mainScreen];
3519 return [screen frame].size.width;
3520}
3521
3522
3506static Lisp_Object ns_string_to_lispmod (const char *s) 3523static Lisp_Object ns_string_to_lispmod (const char *s)
3507/* -------------------------------------------------------------------------- 3524/* --------------------------------------------------------------------------
3508 Convert modifier name to lisp symbol 3525 Convert modifier name to lisp symbol
@@ -3602,8 +3619,6 @@ ns_initialize_display_info (struct ns_display_info *dpyinfo)
3602 NSScreen *screen = [NSScreen mainScreen]; 3619 NSScreen *screen = [NSScreen mainScreen];
3603 NSWindowDepth depth = [screen depth]; 3620 NSWindowDepth depth = [screen depth];
3604 3621
3605 dpyinfo->width = [screen frame].size.width;
3606 dpyinfo->height = [screen frame].size.height;
3607 dpyinfo->resx = 72.27; /* used 75.0, but this makes pt == pixel, expected */ 3622 dpyinfo->resx = 72.27; /* used 75.0, but this makes pt == pixel, expected */
3608 dpyinfo->resy = 72.27; 3623 dpyinfo->resy = 72.27;
3609 dpyinfo->color_p = ![NSDeviceWhiteColorSpace isEqualToString: 3624 dpyinfo->color_p = ![NSDeviceWhiteColorSpace isEqualToString: