summaryrefslogtreecommitdiff
path: root/java/awt/Window.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/awt/Window.java')
-rw-r--r--java/awt/Window.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/java/awt/Window.java b/java/awt/Window.java
index db4cd24bb..2be2d5f17 100644
--- a/java/awt/Window.java
+++ b/java/awt/Window.java
@@ -628,10 +628,25 @@ public class Window extends Container implements Accessible
|| windowStateListener != null
|| (eventMask & AWTEvent.WINDOW_EVENT_MASK) != 0))
processEvent(e);
- else if (e.id == ComponentEvent.COMPONENT_RESIZED)
- validate ();
- else
- super.dispatchEventImpl(e);
+ else
+ {
+ if (peer != null && (e.id == ComponentEvent.COMPONENT_RESIZED
+ || e.id == ComponentEvent.COMPONENT_MOVED))
+ {
+ Rectangle bounds = peer.getBounds();
+ x = bounds.x;
+ y = bounds.y;
+ height = bounds.height;
+ width = bounds.width;
+
+ if (e.id == ComponentEvent.COMPONENT_RESIZED)
+ {
+ invalidate();
+ validate();
+ }
+ }
+ super.dispatchEventImpl(e);
+ }
}
/**