jdk/src/solaris/classes/sun/awt/X11/XListPeer.java
changeset 9472 9f1950d3b025
parent 5506 202f599c92aa
child 10096 f9ac9a52952d
--- a/jdk/src/solaris/classes/sun/awt/X11/XListPeer.java	Tue Apr 19 14:44:09 2011 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XListPeer.java	Tue Apr 19 18:52:49 2011 +0400
@@ -1479,16 +1479,19 @@
         int h = height - (SCROLLBAR_AREA + (2 * MARGIN));
         hsb.setValue(hsb.getValue() + x);
 
+        int options = PAINT_ITEMS | PAINT_HSCROLL;
+
         Rectangle source = null;
         Point distance = null;
         if (x < 0) {
             source = new Rectangle(MARGIN + SPACE, MARGIN, w + x, h);
             distance = new Point(-x, 0);
+            options |= COPY_AREA;
         } else if (x > 0) {
             source = new Rectangle(MARGIN + SPACE + x, MARGIN, w - x, h);
             distance = new Point(-x, 0);
+            options |= COPY_AREA;
         }
-        int options = COPY_AREA | PAINT_ITEMS | PAINT_HSCROLL;
         repaint(vsb.getValue(), lastItemDisplayed(), options, source, distance);
     }