This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui][patch] take out clipping patch


Hi,

Turns out this broke some stuff. Changing it back.

Cheers,

Kim

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: (visitChild):
	Remove candidate clip. Use the component
	clip to intersect.
	* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
	(handleEvent): Use the PaintEvent's clip.
Index: java/awt/Container.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Container.java,v
retrieving revision 1.34.2.4
diff -u -r1.34.2.4 Container.java
--- java/awt/Container.java	9 Mar 2004 16:38:13 -0000	1.34.2.4
+++ java/awt/Container.java	10 Mar 2004 15:36:39 -0000
@@ -1248,17 +1248,11 @@
                           Component comp)
   {
     Rectangle bounds = comp.getBounds();
-    Rectangle candidate = comp.getBounds();
     Rectangle oldClip = gfx.getClipBounds();
     if (oldClip == null)
       oldClip = bounds;
-    else
-    {
-      candidate.x += oldClip.x;
-      candidate.y += oldClip.y;
-    }
 
-    Rectangle clip = oldClip.intersection(candidate);
+    Rectangle clip = oldClip.intersection(bounds);
 
     if (clip.isEmpty()) return;
 
Index: gnu/java/awt/peer/gtk/GtkComponentPeer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java,v
retrieving revision 1.16.2.2
diff -u -r1.16.2.2 GtkComponentPeer.java
--- gnu/java/awt/peer/gtk/GtkComponentPeer.java	10 Mar 2004 14:02:49 -0000	1.16.2.2
+++ gnu/java/awt/peer/gtk/GtkComponentPeer.java	10 Mar 2004 15:36:39 -0000
@@ -236,7 +236,7 @@
               if (g == null)
                 break;
               // FIXME: Find the proper clip.
-              //g.setClip (((PaintEvent)event).getUpdateRect());
+              g.setClip (((PaintEvent)event).getUpdateRect());
 
               if (id == PaintEvent.PAINT)
                 awtComponent.paint (g);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]