changeset 9165:cdbd78e42e03

(set_frame_size, EmacsFrameSetCharSize): Use new width formula.
author Karl Heuer <kwzh@gnu.org>
date Wed, 28 Sep 1994 00:58:15 +0000
parents fbdd7a2e62f4
children 44b44e900cf1
files src/widget.c
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/widget.c	Wed Sep 28 00:57:37 1994 +0000
+++ b/src/widget.c	Wed Sep 28 00:58:15 1994 +0000
@@ -423,10 +423,12 @@
 
     /* Take into account the size of the scrollbar */
     frame->display.x->vertical_scroll_bar_extra
-      = (FRAME_HAS_VERTICAL_SCROLL_BARS (frame)
+      = (!FRAME_HAS_VERTICAL_SCROLL_BARS (frame)
+	 ? 0
+	 : FRAME_SCROLL_BAR_PIXEL_WIDTH (frame) > 0
 	 ? FRAME_SCROLL_BAR_PIXEL_WIDTH (frame)
-	 : 0);
-
+	 : (FRAME_SCROLL_BAR_COLS (frame)
+	    * FONT_WIDTH (frame->display.x->font)));
 
     change_frame_size (frame, h, w, 1, 0);
     char_to_pixel_size (ew, w, h, &pixel_width, &pixel_height);
@@ -883,9 +885,12 @@
 
   check_frame_size (f, &rows, &columns);
   f->display.x->vertical_scroll_bar_extra
-    = (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
+    = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
+       ? 0
+       : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : 0);
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->display.x->font)));
+
   char_to_pixel_size (ew, columns, rows, &pixel_width, &pixel_height);
 
   /* Recompute the entire geometry management.  */