Hi Petr,

The fix looks good to me. I'm concerned with the test a bit:

 69             for (int y = locOnScreen.y + frame.getInsets().top + 10; y < 
locOnScreen.y + 150; y += 5) {

I'd suggest to infer this magic constant 150 from the frame size rather than hard-code the value to make sure the robot never clicks outside of the test frame.

--
best regards,
Anthony

On 12/18/2013 01:54 PM, Petr Pchelko wrote:
Hello, AWT Team.

Please review the fix for the issue:
https://bugs.openjdk.java.net/browse/JDK-7159566
The fix is available at:
http://cr.openjdk.java.net/~pchelko/9/7159566/webrev/

The problem: when showing the choice popup we need to use a choice as an 
invoker to process grab correctly. That's why we have the piece of code I'm 
fixing.
However, we also need to set a correct location of the popup. A 'heavy' 
getLocationOnScreen is used because the choice might have already been moved by 
the
window manager by this point to fit the screen and it's the only public way to 
get the location of the popup menu.

The added test checks that there's no popup on the top of the window by 
clicking there.

With best regards. Petr.

Reply via email to