Skip to content

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

Backlog

Description

@mitar

Preflight Checklist

Electron Version

45.5.0

What operating system(s) are you using?

Other Linux, Ubuntu

Operating System Version

Ubuntu 26.04, GNOME 50, Wayland (the app runs with --ozone-platform=wayland)

What arch are you using?

x64

Last Known Working Electron version

Not known.

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

When com.canonical.AppMenu.Registrar loses its owner, for example because the desktop's global menu is turned off or the registrar exits, the window shows its own menu bar again, as it does when the app starts without a registrar.

Actual Behavior

The window keeps its menu bar hidden, and Alt does not show it either, so the app has no menu at all until it sets its application menu again or restarts. When a registrar owns the name again, Electron registers the window with it again, so only the way back to the window's own menu bar is missing.

Testcase Gist URL

https://gist.github.com/mitar/eacd4d3133626c1739a25c884c7abcc7

Additional Information

Steps, with the gist's main.js (an application menu with File and Edit, and one window) and appmenu-registrar from Ubuntu's or Debian's appmenu-registrar package as the registrar:

  1. Start the registrar: /usr/libexec/vala-panel/appmenu-registrar --gapplication-service &
  2. Start the app: electron --ozone-platform=wayland .. The window opens without its menu bar, as the menu is exported over D-Bus.
  3. Stop the registrar: kill %1.

The window still has no menu bar, and Alt does nothing. Without step 1, the window shows its File and Edit menu bar. We first saw this with Signal Desktop, whose menu bar stayed hidden when the GNOME Shell extension which shows the exported menus was disabled, together with the registrar it uses, while Signal without a registrar shows its menu bar and Alt focuses it. I tried only Wayland, not X11.

NativeWindowViews::SetMenu() decides between the global menu and the window's own menu bar only when the menu is set, with ShouldUseGlobalMenuBar(), and it already drops the window's menu bar when the registrar appeared between two calls. GlobalMenuBarRegistrarX11::OnNameOwnerChanged() reacts to every change of the name's owner by registering the live windows again, also when the name has no owner anymore, and nothing switches the window back to its own menu bar then. Showing the window's menu bar again when the name loses its owner, and dropping it again once the windows are registered with a new owner, would keep a menu available in both cases.

Activity

  1. added theissue type on Nov 25, 2026
  2. added
    has-repro-gist
    on Nov 25, 2026
  3. moved this to 👀 Unsorted Items in 45-x-yon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    45-x-ybug 🪲has-repro-gistplatform/linux

    Type

    Projects

    • Status
      👀 Unsorted Items

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions