<AWT Dev> [11] Review Request: 8196322: [macosx] When the screen menu bar is used, clearing the default menu bar should permit AWT shutdown

Alan Snyder javalists at cbfiddle.com
Tue Feb 20 15:18:08 UTC 2018


Hello,

Please review the following bug fix.

Thank you.

  Alan

Bug: https://bugs.openjdk.java.net/browse/JDK-8196322 <https://bugs.openjdk.java.net/browse/JDK-8196322>
webrev: http://cr.openjdk.java.net/~serb/alans/8196322/webrev.00/ <http://cr.openjdk.java.net/~serb/alans/8196322/webrev.00/>

When a default menu bar is set and the screen menu bar is in use, a heavyweight ScreenMenuBar is created
to manage the connection to the native application menu bar and addNotify() is called to create peers. The
peers are registered and they prevent AWT shutdown from happening.

If the default menu bar is removed, by setting it to null, removeNotify() is not called, so the peers remain
registered and AWT shutdown is still prevented.

The change is to call removeNotify when the current default menu bar is replaced, either by null or a different
menu bar.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20180220/8cc64eb5/attachment.html>


More information about the awt-dev mailing list