changeset 107798:04b6d1cf4d69

Fix resizing for X and non-Gtk+ build. Bug #5848. * frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use FRAME_LINE_TO_PIXEL_Y. * xterm.c (x_set_window_size_1): Don't add border_width/height to pixelwidth/height.
author Jan D <jan.h.d@swipnet.se>
date Wed, 07 Apr 2010 13:39:26 +0200
parents 702528fcbb6a
children 44bc63178420
files src/ChangeLog src/frame.h src/xterm.c
diffstat 3 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Apr 06 23:11:45 2010 -0700
+++ b/src/ChangeLog	Wed Apr 07 13:39:26 2010 +0200
@@ -1,3 +1,11 @@
+2010-04-07  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use
+	FRAME_LINE_TO_PIXEL_Y.
+
+	* xterm.c (x_set_window_size_1): Don't add border_width/height to
+	pixelwidth/height.
+
 2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Simplify code for HP machines.
--- a/src/frame.h	Tue Apr 06 23:11:45 2010 -0700
+++ b/src/frame.h	Wed Apr 07 13:39:26 2010 +0200
@@ -997,8 +997,8 @@
    + FRAME_INTERNAL_BORDER_WIDTH (f))
 
 #define FRAME_TEXT_LINES_TO_PIXEL_HEIGHT(f, lines) \
-  (FRAME_LINE_TO_PIXEL_Y (f, lines) \
-   + FRAME_INTERNAL_BORDER_WIDTH (f))
+  ((lines) * FRAME_LINE_HEIGHT (f) \
+   + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
 
 /* Return the row/column (zero-based) of the character cell containing
--- a/src/xterm.c	Tue Apr 06 23:11:45 2010 -0700
+++ b/src/xterm.c	Wed Apr 07 13:39:26 2010 +0200
@@ -8931,11 +8931,9 @@
 
   compute_fringe_widths (f, 0);
 
-  pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols)
-    + 2*f->border_width;
+  pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols);
   pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows)
-    + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)
-    + 2*f->border_width;
+    + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
 
   if (change_gravity) f->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);