Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8091629: [Mac] Support the automatic hiding of the "java" menu bar item when using the system menu bar #1737

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

beldenfox
Copy link
Contributor

@beldenfox beldenfox commented Mar 14, 2025

On the Mac the application menu (the one to the right of the Apple logo menu) is created by JavaFX and there is no public API to customize or localize it. This PR allows a client to get rid of it and replace it with an entirely custom JavaFX Menu.

Prior to OS X 10.6 (Snow Leopard) the application menu required special handling. Nowadays it's just the first item in the NSApp's mainMenu. The only restriction is that the OS ignores the item's title and instead uses the application's name as specified in the CFBundle.

This PR is a work-in-progress/trial balloon. It provides a new property on the MenuBar that controls whether the system will use the default menus. It also supplies the calls necessary to implement the standard menu items "Hide ", "Hide Others", and "Show All" which need to be routed to native calls on the NSApplication object. A manual test app is available in tests/manual/controls/DefaultAppMenu.java.


Progress

  • Change requires a CSR request matching fixVersion jfx25 to be approved (needs to be created)
  • 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)

Issue

  • JDK-8091629: [Mac] Support the automatic hiding of the "java" menu bar item when using the system menu bar (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1737

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 14, 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 Mar 14, 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 Mar 14, 2025
@mlbridge
Copy link

mlbridge bot commented Mar 14, 2025

Webrevs

@kevinrushforth
Copy link
Member

This should be discussed on the mailing list first. I recommend moving it to Draft for now. If it goes forward it will need a CSR.

/reviewers 2 reviewers
/csr

@openjdk
Copy link

openjdk bot commented Mar 14, 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 Mar 14, 2025
@openjdk
Copy link

openjdk bot commented Mar 14, 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-8091629 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@beldenfox beldenfox marked this pull request as draft March 14, 2025 23:02
@openjdk openjdk bot removed the rfr Ready for review label Mar 14, 2025
@@ -0,0 +1,63 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
Copy link

@OguzOzkeroglu OguzOzkeroglu Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.

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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants