changeset 25269:621067279f19

(XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: Simplify clearing "under" scroll bar.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 15 Aug 1999 22:01:01 +0000
parents ae698a1c13a4
children 7c4983be66e4
files src/xterm.c
diffstat 1 files changed, 6 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sun Aug 15 22:00:53 1999 +0000
+++ b/src/xterm.c	Sun Aug 15 22:01:01 1999 +0000
@@ -7915,39 +7915,12 @@
 	mask |= CWHeight;
       
 #ifdef USE_TOOLKIT_SCROLL_BARS
-      
-      if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f))
-	{
-	  XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-		      pixel_left + pixel_width - scroll_bar_area_width,
-		      pixel_top,
-		      (scroll_bar_area_width
-		       - pixel_width
-		       + VERTICAL_SCROLL_BAR_WIDTH_TRIM),
-		      pixel_height, False);
-	  XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-		      (pixel_left
-		       + pixel_width
-		       - VERTICAL_SCROLL_BAR_WIDTH_TRIM),
-		      pixel_top,
-		      VERTICAL_SCROLL_BAR_WIDTH_TRIM,
-		      pixel_height, False);
-	}
-      else
-	{
-	  XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-		      pixel_left, pixel_top,
-		      VERTICAL_SCROLL_BAR_WIDTH_TRIM, pixel_height, False);
-	  XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-		      (pixel_left
-		       + pixel_width
-		       - VERTICAL_SCROLL_BAR_WIDTH_TRIM),
-		      pixel_top,
-		      (scroll_bar_area_width
-		       - pixel_width
-		       + VERTICAL_SCROLL_BAR_WIDTH_TRIM),
-		      pixel_height, False);
-	}
+
+      /* Since toolkit scroll bars are smaller than the space reserved
+	 for them on the frame, we have to clear "under" them.  */
+      XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+		  pixel_left, pixel_top,
+		  pixel_width + 1, pixel_height, False);
 
       /* Move/size the scroll bar widget.  */
       if (mask)