The attached patch fixes the painting mechanism, so that we do not paint
unnecessary stuff.

2005-12-19  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/JComponent.java
        (findOverlapFreeParent): Fixed component lookup for painting.

/Roman
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.94
diff -u -r1.94 JComponent.java
--- javax/swing/JComponent.java	15 Dec 2005 17:48:20 -0000	1.94
+++ javax/swing/JComponent.java	19 Dec 2005 14:28:49 -0000
@@ -3264,7 +3264,7 @@
         Rectangle target = SwingUtilities.convertRectangle(found,
                                                            currentClip,
                                                            newParent);
-        if (target.contains(parRect) || target.intersects(parRect))
+        if (! target.intersection(parRect).equals(target))
           {
             found = newParent;
             currentClip = target;
@@ -3280,10 +3280,12 @@
         boolean skip = true;
         for (int i = children.length - 1; i >= 0; i--)
           {
+            boolean nextSkip = skip;
             if (children[i] == parent)
-              skip = false;
+              nextSkip = false;
             if (skip)
               continue;
+            skip = nextSkip;
             Component c = children[i];
             Rectangle compBounds = c.getBounds();
             // If the component completely overlaps the clip in question, we
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to