When the location of a Dialog is changed before it is visible, it does
not take any effect. The Dialog would appear at some arbitrary location.
This is now fixed.
2006-02-14 Lillian Angel <[EMAIL PROTECTED]>
* gnu/java/awt/peer/gtk/GtkDialogPeer.java
(setVisible): New method to override super. Need to set the
native bounds of the component, so it appears at the
correct location.
Index: gnu/java/awt/peer/gtk/GtkDialogPeer.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/GtkDialogPeer.java,v
retrieving revision 1.30
diff -u -r1.30 GtkDialogPeer.java
--- gnu/java/awt/peer/gtk/GtkDialogPeer.java 16 Nov 2005 15:58:05 -0000 1.30
+++ gnu/java/awt/peer/gtk/GtkDialogPeer.java 14 Feb 2006 19:37:18 -0000
@@ -62,6 +62,16 @@
g.translate (-insets.left, -insets.top);
return g;
}
+
+ public void setVisible (boolean b)
+ {
+ // Prevent the window manager from automatically placing this
+ // window when it is shown.
+ setBounds(awtComponent.getX(), awtComponent.getY(),
+ awtComponent.getWidth(), awtComponent.getHeight());
+
+ super.setVisible(b);
+ }
protected void postMouseEvent(int id, long when, int mods, int x, int y,
int clickCount, boolean popupTrigger)