]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
authorGerd Moellmann <gerd@gnu.org>
Fri, 26 Oct 2001 12:00:28 +0000 (12:00 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 26 Oct 2001 12:00:28 +0000 (12:00 +0000)
Fix clearing in the case of scroll bars on the right.

src/ChangeLog
src/xterm.c

index 461978de98a270854ab7394047ca1a8b888931f9..8628e831f833a9c1efb6da64a19c5dcdccdb4b87 100644 (file)
@@ -1,5 +1,8 @@
 2001-10-26  Gerd Moellmann  <gerd@gnu.org>
 
+       * xterm.c (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
+       Fix clearing in the case of scroll bars on the right.
+       
        * xfns.c (XScreenNumberOfScreen): Fix struct to pointer
        comparison.
 
index d6d1f827dd5943a11b1212a337bd9057f963e16f..d18f671a108eece564756e8c1b5fd46548957cd8 100644 (file)
@@ -9239,10 +9239,16 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
       {
        int area_width = FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f);
        int rest = area_width - sb_width;
-       if (rest > 0)
-         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       left + area_width -  rest, top,
-                       rest, max (height, 1), False);
+       if (rest > 0 && height > 0)
+         {
+           if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f))
+             x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                           left + area_width -  rest, top,
+                           rest, height, False);
+           else
+             x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                           left, top, rest, height, False);
+         }
       }
       
       /* Move/size the scroll bar window.  */