Skip to content

Conversation

beldenfox
Copy link
Contributor

@beldenfox beldenfox commented Sep 2, 2025

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 , Hide Others, and Show All menu items that are expected in the application menu.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)
  • Change requires a CSR request matching fixVersion jfx26 to be approved (needs to be created)

Issue

  • JDK-8366568: Allow replacing built in application menu in system menu bar (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1881/head:pull/1881
$ git checkout pull/1881

Update a local copy of the PR:
$ git checkout pull/1881
$ git pull https://git.openjdk.org/jfx.git pull/1881/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1881

View PR using the GUI difftool:
$ git pr show -t 1881

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1881.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2025

👋 Welcome back mfox! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 2, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Ready for review label Sep 2, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 2, 2025

Webrevs

@kevinrushforth
Copy link
Member

The idea seems interesting. It will need discussion on the mailing list, which I see you've started.

/reviewers 2 reviewers
/csr needed

@openjdk
Copy link

openjdk bot commented Sep 3, 2025

@kevinrushforth
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 2 Reviewers).

@openjdk openjdk bot added the csr Need approved CSR to integrate pull request label Sep 3, 2025
@openjdk
Copy link

openjdk bot commented Sep 3, 2025

@kevinrushforth has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@beldenfox please create a CSR request for issue JDK-8366568 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csr Need approved CSR to integrate pull request rfr Ready for review
Development

Successfully merging this pull request may close these issues.

2 participants