[gui][PATCH] Fix for Dialog placement

Thomas Fitzsimmons fitzsim@redhat.com
Fri Oct 8 20:51:00 GMT 2004


Hi,

This patch, which I just committed to java-gui-branch, fixes problems
with dialog placement.

Tom

2004-10-08  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkContainerPeer.java (endValidate):
	Don't call setParentAndBounds on GtkWindowPeers.

Index: gnu/java/awt/peer/gtk/GtkContainerPeer.java
===================================================================
RCS file:
/cvs/gcc/gcc/libjava/gnu/java/awt/peer/gtk/GtkContainerPeer.java,v
retrieving revision 1.8.2.5
diff -u -r1.8.2.5 GtkContainerPeer.java
--- gnu/java/awt/peer/gtk/GtkContainerPeer.java	7 Oct 2004 22:11:57
-0000	1.8.2.5
+++ gnu/java/awt/peer/gtk/GtkContainerPeer.java	8 Oct 2004 20:21:53
-0000
@@ -88,7 +88,9 @@
               ((GtkComponentPeer) peer).setParentAndBounds ();
           }
 
-        setParentAndBounds ();
+        // GTK windows don't have parents.
+        if (!(awtComponent instanceof Window))
+          setParentAndBounds ();
       }
 
     isValidating = false;




More information about the Java-patches mailing list