Leonid,

SwingUtilities.getWindowAncestor returns null if passed argument is instance
of Window, so "originalSource == winAncestorthis" check is to handle this case.
I will replace this method with SunToolkit.getContainingWindow,
it returns passed argument, if it's windows instance. So there will be only one check:
SunToolkit.getContainingWindow(originalSource )  == winAncestor.

On 10/29/2012 4:12 PM, Leonid Romanov wrote:

I don't understand lines 147-148 in WindowsRootPaneUI.java. Could you explain please why two checks are needed (originalSource == winAncestor and SwingUtilities.getWindowAncestor(originalSource) == winAncestor)

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Mikhail Cherkasov
*Sent:* Monday, October 29, 2012 4:12 PM
*To:* [email protected]
*Subject:* Re: <AWT Dev> [8] [PATCH] Review request for 8001633: Wrong alt processing during switching between windows.

Sorry, I sent wrong link for webrev, please use this one:
http://cr.openjdk.java.net/~alexp/8001633/webrev.00/ <http://cr.openjdk.java.net/%7Ealexp/8001633/webrev.00/>

On 10/29/2012 2:23 PM, Mikhail Cherkasov wrote:

    Hi all,

    Could you please review a fix for 8001633
    <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8001633>:
    Wrong alt processing during switching between windows.
    Bug:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8001633
    Webrev:
    http://cr.openjdk.java.net/~bagiras/8/7082294.1/
    <http://cr.openjdk.java.net/%7Ebagiras/8/7082294.1/>

    To prevent wrong focus traversing to menu was added additional
    check to AltProcessor.
    It checks that original source of 'alt' event belongs to
    AltProcessor.winAncestor
    or its component.

    Patch is attached.

    Thanks,
    Mikhail.


Reply via email to