Hi Roman,

Roman Kennke wrote:
Somehow the peer->AWT component bounds update has been broken, resulting
in:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29448

Some testing shows that the bounds is not updated via:
- Component.reshape() calls (this could induce loops)
- Some event via the EventQueue
What remains is:
- Private callback methods called from JNI or via reflection
- Magic

and the way that I did it:
- Directly dispatch a special event to the (final)
Component.dispatchEvent() to carry the new bounds to the AWT.

Yes, nice idea. This is a cleaner solution than the private Window.setBoundsCallback method we used to call from JNI.

This is not really testable, because that method is final. However, this
impossibility to test seems to indicate that this also can't be a
compatibility issue.

Good point.

   protected void postConfigureEvent (int x, int y, int width, int height)
   {
+    int frame_x = x - insets.left;
+    int frame_y = y - insets.top;
     int frame_width = width + insets.left + insets.right;
     int frame_height = height + insets.top + insets.bottom;
+ // Update the component's knowledge about the size.
+    // Important: Please look at the big comment in ComponentReshapeEvent
+    // to learn why we did it this way. If you change this code, make
+    // sure that the peer->AWT bounds update still works.
+    // (for instance: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29448 )
+
+    // We do this befor

Typo.

Tom

Reply via email to