jfx icon indicating copy to clipboard operation
jfx copied to clipboard

8366568: Allow replacing built in application menu in system menu bar

Open beldenfox opened this issue 4 months ago • 11 comments

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

  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)
  • [ ] Change requires CSR request JDK-8369047 to be approved

Issues

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

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

beldenfox avatar Sep 02 '25 15:09 beldenfox

:wave: 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.

bridgekeeper[bot] avatar Sep 02 '25 15:09 bridgekeeper[bot]

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

openjdk[bot] avatar Sep 02 '25 15:09 openjdk[bot]

Webrevs

mlbridge[bot] avatar Sep 02 '25 15:09 mlbridge[bot]

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

/reviewers 2 reviewers /csr needed

kevinrushforth avatar Sep 03 '25 12:09 kevinrushforth

@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[bot] avatar Sep 03 '25 13:09 openjdk[bot]

@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.

openjdk[bot] avatar Sep 03 '25 13:09 openjdk[bot]

@beldenfox This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Oct 01 '25 15:10 bridgekeeper[bot]

Reviewers: @kevinrushforth @arapte

kevinrushforth avatar Oct 29 '25 17:10 kevinrushforth

@beldenfox This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

bridgekeeper[bot] avatar Nov 26 '25 22:11 bridgekeeper[bot]

/keepalive

beldenfox avatar Dec 02 '25 17:12 beldenfox

@beldenfox The pull request is being re-evaluated and the inactivity timeout has been reset.

openjdk[bot] avatar Dec 02 '25 17:12 openjdk[bot]