<AWT Dev> [8] [PATCH] Review request for 8001633: Wrong alt processing during switching between windows.

Leonid Romanov leonid.romanov at oracle.com
Mon Oct 29 12:40:36 PDT 2012


Hi,
I've found that reversing the check order in WindowsRootPaneUI.java like
this

skip = SunToolkit.getContainingWindow(originalSource) != winAncestor 
	|| ev.getWhen() <= ((SunToolkit)
tk).getWindowDeactivationTime(winAncestor); 

also fixes the alt-tab exception regression. Could you check please that
this change indeed fixes the exception bug and if it does, incorporate it
into your patch. 

> -----Original Message-----
> From: awt-dev-bounces at openjdk.java.net [mailto:awt-dev-
> bounces at openjdk.java.net] On Behalf Of Mikhail Cherkasov
> Sent: Monday, October 29, 2012 8:18 PM
> To: Anton V. Tarasov; awt-dev at openjdk.java.net
> Subject: Re: <AWT Dev> [8] [PATCH] Review request for 8001633: Wrong alt
> processing during switching between windows.
> 
> Please review the second version:
> http://cr.openjdk.java.net/~alexp/8001633/webrev.01/
> <http://cr.openjdk.java.net/%7Ealexp/8001633/webrev.01/>
> All remarks was corrected.
> 
> On 10/29/2012 4:32 PM, Anton V. Tarasov wrote:
> > Hi Mikhail,
> >
> > * KeyEvent.java
> >
> > - No need to initialize 'originalSource' in constructors which call to
> > this(...) where you already initialized it.
> >
> > -950      * we need to able to obtain original source.
> >
> > "be" is omitted ("we need to be able")
> >
> > * WindowsRootPaneUI.java
> >
> > I think there's no need to put another 'skip' setting into a separate
> > if-block (skip will be equal 'false' in majority of cases).
> > Why don't you write it simply as follows?
> >
> > Component originalSource =
> > AWTAccessor.getKeyEventAccessor().getOriginalSource(ev);
> >
> > skip = (ev.getWhen()<=
> > ((SunToolkit)tk).getWindowDeactivationTime(winAncestor)) ||
> >        SwingUtilities.getWindowAncestor(originalSource) != winAncestor);
> >
> >
> > Thanks,
> > Anton.
> >
> > On 29.10.2012 14:23, 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
> >> <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8001633>
> >> Webrev:
> >> http://cr.openjdk.java.net/~bagiras/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.
> >>
> >





More information about the awt-dev mailing list