]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
authorGerd Moellmann <gerd@gnu.org>
Sun, 15 Aug 1999 22:01:01 +0000 (22:01 +0000)
committerGerd Moellmann <gerd@gnu.org>
Sun, 15 Aug 1999 22:01:01 +0000 (22:01 +0000)
Simplify clearing "under" scroll bar.

src/xterm.c

index 7d166ada1602cdd7630eddd69ffd941789c06829..8d6684083129985de978a61ca0848606275d9370 100644 (file)
@@ -7915,39 +7915,12 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
        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)