Skip to content

fix: restore the window menu bar when the global menu registrar exits - #56074

Open
adityawrk wants to merge 1 commit into
electron:mainfrom
adityawrk:restore-window-menu-bar
Open

adityawrk wants to merge 1 commit into
electron:mainfrom
adityawrk:restore-window-menu-bar

Conversation

@adityawrk

@adityawrk adityawrk commented Nov 26, 2026 •

Copy link
Copy Markdown

Description of Change

When com.canonical.AppMenu.Registrar loses its name owner, a window that had exported its menu kept the in-window menu bar hidden, and Alt could not reveal it. The registrar now registers windows only while the name has an owner, and the window shows its own menu bar until a registrar owns the name again. ELECTRON_FORCE_WINDOW_MENU_BAR still keeps the menu in the window.

Fixes #56066.

Assisted-By: Grok 4.7

This was not compiled here. Electron's build and a Linux session bus with a registrar were not available, and this path has no C++ unit-test target.

Checklist

Release Notes

Notes: Fixed the window menu bar not being restored when the global menu registrar exits.

When com.canonical.AppMenu.Registrar lost its name owner, windows that
had exported their menu kept the in-window menu bar hidden, and Alt
could not reveal it either. Show that menu bar again while the name is
unowned, and hide it once the windows are registered with a new owner.

Fixes electron#56066

Assisted-By: Grok 4.7
@welcome

welcome Bot commented Nov 26, 2026

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

Semantic PR titles

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Commit signing

This repo enforces commit signatures for all incoming PRs.
To sign your commits, see GitHub's documentation on Telling Git about your signing key.

PR tips

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR contains unsigned commits. This repository enforces commit signatures
for all incoming PRs. To get your PR merged, please sign those commits
(git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch
(git push --force-with-lease)

For more information on signing commits, see GitHub's documentation on Telling Git about your signing key.

@github-actions github-actions Bot added the needs-signed-commits Currently some or all of the commits in this PR are not signed label Nov 26, 2026
@release-clerk

release-clerk Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Release note looks good now.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-signed-commits Currently some or all of the commits in this PR are not signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Window menu bar stays hidden after the global menu registrar goes away

1 participant