<AWT Dev> [8] Review request for 8008728 [macosx] Swing. JDialog. Modal dialog goes to background

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Wed Sep 25 07:58:54 PDT 2013

On 9/16/2013 4:09 PM, Anthony Petrov wrote:
> Hi Alexander,
> The fix looks good overall. A couple of minor issues:
> src/macosx/native/sun/awt/AWTWindow.m
>>  369     if(!self.isEnabled){
> Please add missing spaces.
>>  377 "checkBlockingAndOrder", "()Z");
>>  378             JNFCallVoidMethod(env, platformWindow, 
>> jm_checkBlockingAndOrder);
> This is actually a Boolean method, not a Void one. Please use the 
> correct JNFCall* function.

    Sorry. I missed your comments before the push.
    I have created new issue 8025438 [macosx] right JNFCall* method 
should be used in JDK-8008728 fix

> As for the test, how does it fail? I see that all exceptions get 
> thrown on the test thread, not the main thread. Does this cause the 
> jtreg harness to consider the test failed or not?
     Yes. The jtreg fails the test without the fix.
     The modalDialog.setVisible(true) call blocks the thread. May be 
there is a better way to test a modal dialog behaviour.


> -- 
> best regards,
> Anthony
> On 09/05/13 18:59, Alexander Scherbatiy wrote:
>> Hello,
>> Could you review the fix:
>> bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8008728
>> webrev: http://cr.openjdk.java.net/~alexsch/8008728/webrev.00
>> Suppose there are 2 frames and one modal dialog which has the first
>> frame as a parent.
>> When we click on the second window the canBecomeMainWindow method
>> returns NO (the second window
>> is disabled because of the modal dialog) and it does not receive the
>> windowDidBecomeMain event.
>> But Mac OS X system places the second window over the modal dialog.
>> The fix checks the right order of windows in the canBecomeMainWindow
>> method.
>> Thanks,
>> Alexandr.

More information about the awt-dev mailing list