<AWT Dev> [8] Request for review: 7166296 closed/java/awt/Frame/DisabledParentOfToplevel/DisabledParentOfToplevel.html failed since 1.8.0b36
Anthony Petrov
anthony.petrov at oracle.com
Mon Apr 22 06:29:23 PDT 2013
Hi Sergey,
> 992 // A window has a parent, but it does NOT have a container.
"Parent" is a very loose term which better be avoided. A window has an
owner. A component has a container. Unfortunately, in Java both are
called "parents" too very often. Please rephrase the comment to avoid
using the term "parent".
Regarding the fix itself. Calling SunToolkit.getNativeContainer()
results in a call to Component.getNativeContainer(). And it is in this
method where the real bug resides. This method traverses the "parents"
tree w/o actually checking if it goes beyond its top-level window. I
suggest to fix the root cause of the bug in shared code rather than
tweak a platform implementation. Note that there's a method
Component.getContainer() designed specifically for cases where we want
to avoid traversing owner windows.
--
best regards,
Anthony
On 04/22/13 16:06, Sergey Bylokhov wrote:
> Hello,
> Please review the fix for jdk 8.
> SetEnable method check status of all parent containers and windows(via
> getParent() in SunToolkit.getNativeContainer()). But only containers in
> the same window should be checked.
> The new method was added to return the peer of the nearest heavyweight
> container.
>
> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166296
> Webrev can be found at: http://cr.openjdk.java.net/~serb/7166296/webrev.00
>
More information about the awt-dev
mailing list