changeset 47429:49c23a6bf79f

(x_report_frame_params): If FRAME_SCROLL_BAR_PIXEL_WIDTH is 0 and we have non-toolkit scroll bars, return nil for scroll-bar-width.
author Richard M. Stallman <rms@gnu.org>
date Thu, 12 Sep 2002 03:26:23 +0000
parents eb0020984860
children 612929500d46
files src/xfns.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Thu Sep 12 03:26:01 2002 +0000
+++ b/src/xfns.c	Thu Sep 12 03:26:23 2002 +0000
@@ -1295,9 +1295,13 @@
   store_in_alist (alistptr, Qright_fringe,
        	   make_number (f->output_data.x->right_fringe_width));
   store_in_alist (alistptr, Qscroll_bar_width,
-           make_number (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
-                        ? FRAME_SCROLL_BAR_PIXEL_WIDTH(f)
-                        : 0));
+		  (! FRAME_HAS_VERTICAL_SCROLL_BARS (f)
+		   ? make_number (0)
+		   : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
+		   ? make_number (FRAME_SCROLL_BAR_PIXEL_WIDTH (f))
+		   /* nil means "use default width"
+		      for non-toolkit scroll bar */
+		   : Qnil));
   sprintf (buf, "%ld", (long) FRAME_X_WINDOW (f));
   store_in_alist (alistptr, Qwindow_id,
        	   build_string (buf));