On Thu, 2 Jul 2026 15:16:02 GMT, Martin Fox <[email protected]> wrote:
>> This PR provides an API for replacing the application menu that JavaFX >> places in the system menu bar on macOS. The application menu is the one next >> to the Apple menu that is titled with the application's name and contains >> the Quit menu item. The JavaFX version of this menu has many limitations so >> this PR allows a developer to simply replace it outright. >> >> Technically there’s no reason to restrict this to only one menu so the API >> allows the developer to specify an observable list of Menus known as the >> common system menus. Like the current application menu the common menus are >> present for all JavaFX windows and remain present even if all windows lose >> focus. Any per-window menus provided by a MenuBar with useSystemMenuBar set >> will appear alongside the common system menus. >> >> In addition the PR provides some calls that allow a developer to implement >> the Hide <app name>, Hide Others, and Show All menu items that are expected >> in the application menu. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Martin Fox has updated the pull request incrementally with one additional > commit since the last revision: > > Added manual test app modules/javafx.graphics/src/main/java/javafx/application/ApplicationServices.java line 34: > 32: * methods to show and hide other applications. > 33: * > 34: * @since 26 minor: `@since 28` here, and I don't think it needs to be mentioned in every method in this class. tests/manual/controls/CommonSystemMenus.java line 25: > 23: * questions. > 24: */ > 25: Thank you for providing a test application! The place seems wrong - there is a bunch of existing system menu tests in `tests/manual/systemmenu`, so maybe there. Also, it probably should not use the default package, but placed in its own. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3516171848 PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3516189777
