On Wed, 1 Jul 2026 20:07:48 GMT, Andy Goryachev <[email protected]> wrote:
>> Martin Fox has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains eight additional
>> commits since the last revision:
>>
>> - Merge remote-tracking branch 'upstream/master' into commonmenus
>> - Tweaked testing utility that searches NSApp.mainMenu, added tests
>> - Merge remote-tracking branch 'upstream/master' into commonmenus
>> - New way of testing system menu bar, updated tests
>> - Merge remote-tracking branch 'upstream/master' into commonmenus
>> - Quick fix for a javadoc issue.
>> - Merge remote-tracking branch 'upstream/master' into commonmenus
>> - Specify a list of menus that are always present in the system menu bar
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
> line 511:
>
>> 509: * @param menuList list of common menus
>> 510: */
>> 511: public static void setCommonSystemMenus(final ObservableList<Menu>
>> menuList) {
>
> This adds a public API (the skin is public).
>
> Do we *want* to have this as public API? If not, we should probably use a
> helper.
Good catch. No, this shouldn't be public. I was waiting some discussion of the
approach before going through the tedium of hooking up the helper.
> modules/javafx.graphics/src/main/java/javafx/application/ApplicationServices.java
> line 32:
>
>> 30: /**
>> 31: * This class provides services for an Application. This includes
>> 32: * methods to show and hide other applications.
>
> what is the purpose of this? how is it relevant to the application menu?
If you want to replace the default application menu you need to provide three
standard items, "Hide <application>", "Hide Others", and "Show All". These
require calling into the platform code to implement. There was no obvious place
to add these calls so I added ApplicationServices.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3509644261
PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3509651028