changeset 107926:d1704f1bb946

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 18:34:31 +0200
parents d95939738dba
children 34782d196992 d7a48f464405
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	Wed Apr 07 15:09:33 2010 +0900
+++ b/src/ChangeLog	Wed Apr 07 18:34:31 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-05  Chong Yidong  <cyd@stupidchicken.com>
 
 	* xdisp.c (prepare_menu_bars): Don't call ns_set_doc_edited for
--- a/src/frame.h	Wed Apr 07 15:09:33 2010 +0900
+++ b/src/frame.h	Wed Apr 07 18:34:31 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	Wed Apr 07 15:09:33 2010 +0900
+++ b/src/xterm.c	Wed Apr 07 18:34:31 2010 +0200
@@ -8933,11 +8933,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);