From: Chong Yidong Date: Thu, 18 Sep 2008 18:11:05 +0000 (+0000) Subject: (x_display_pixel_height, x_display_pixel_width): New functions. X-Git-Tag: emacs-pretest-23.0.90~2863 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95958e6c80618b3ae15e2558d59a1fc6b5b0f1d0;p=emacs.git (x_display_pixel_height, x_display_pixel_width): New functions. (x_calc_absolute_position): Use them. (x_term_init): Omit removed `height' and `width' members. --- diff --git a/src/xterm.c b/src/xterm.c index 88fb04d665e..b948f042b6a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -526,6 +526,20 @@ x_set_frame_alpha (f) x_uncatch_errors (); } +int +x_display_pixel_height (dpyinfo) + struct x_display_info *dpyinfo; +{ + return HeightOfScreen (dpyinfo->screen); +} + +int +x_display_pixel_width (dpyinfo) + struct x_display_info *dpyinfo; +{ + return WidthOfScreen (dpyinfo->screen); +} + /*********************************************************************** Starting and ending an update @@ -8335,8 +8349,8 @@ x_calc_absolute_position (f) /* Treat negative positions as relative to the leftmost bottommost position that fits on the screen. */ if (flags & XNegative) - f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width - - FRAME_PIXEL_WIDTH (f) + f->left_pos); + f->left_pos = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)) + - FRAME_PIXEL_WIDTH (f) + f->left_pos; { int height = FRAME_PIXEL_HEIGHT (f); @@ -8357,8 +8371,9 @@ x_calc_absolute_position (f) XtVaGetValues (f->output_data.x->column_widget, XtNheight, &height, NULL); #endif - if (flags & YNegative) - f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height - height + f->top_pos); + if (flags & YNegative) + f->top_pos = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)) + - height + f->top_pos; } /* The left_pos and top_pos @@ -10193,8 +10208,6 @@ x_term_init (display_name, xrm_option, resource_name) DefaultScreen (dpyinfo->display)); select_visual (dpyinfo); dpyinfo->cmap = DefaultColormapOfScreen (dpyinfo->screen); - dpyinfo->height = HeightOfScreen (dpyinfo->screen); - dpyinfo->width = WidthOfScreen (dpyinfo->screen); dpyinfo->root_window = RootWindowOfScreen (dpyinfo->screen); dpyinfo->client_leader_window = 0; dpyinfo->grabbed = 0;