Skip to content

fix: set_as_windows_menu_for_nsapp command wrongly called set_as_help_menu_for_nsapp#15386

Merged
Legend-Master merged 1 commit into
tauri-apps:devfrom
DominikPeters:fix/menu-window-nsapp-command
May 15, 2026
Merged

fix: set_as_windows_menu_for_nsapp command wrongly called set_as_help_menu_for_nsapp#15386
Legend-Master merged 1 commit into
tauri-apps:devfrom
DominikPeters:fix/menu-window-nsapp-command

Conversation

@DominikPeters

@DominikPeters DominikPeters commented May 15, 2026

Copy link
Copy Markdown
Contributor

What changed

Fixes the plugin:menu|set_as_windows_menu_for_nsapp command handler so it calls Submenu::set_as_windows_menu_for_nsapp() instead of Submenu::set_as_help_menu_for_nsapp(). This was probably a typo.

Why

Submenu.setAsWindowsMenuForNSApp() currently invokes the correct JavaScript command name, but the Rust command implementation routes it to the Help menu setter. As a result, apps using the JS API do not register their Window submenu as the AppKit Window menu, so macOS cannot attach native Window menu behavior such as the system window/tiling entries.

The app-menu auto-registration path for WINDOW_SUBMENU_ID already calls the correct method; this patch makes the JS command path consistent with it.

Related

Validation

  • cargo fmt --check --all
  • cargo check -p tauri --lib

@DominikPeters
DominikPeters requested a review from a team as a code owner May 15, 2026 14:02
@github-actions

github-actions Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 9626b03

There are 5 changes which include tauri-bundler with minor, tauri-cli with minor, tauri-utils with minor, tauri with patch, tauri-build with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.9.1 2.10.0
tauri-bundler 2.9.1 2.10.0
tauri-runtime 2.11.1 2.11.2
tauri-runtime-wry 2.11.1 2.11.2
tauri-codegen 2.6.1 2.6.2
tauri-macros 2.6.1 2.6.2
tauri-plugin 2.6.1 2.6.2
tauri-build 2.6.1 2.7.0
tauri 2.11.1 2.11.2
@tauri-apps/cli 2.11.1 2.11.2
tauri-cli 2.11.1 2.12.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Legend-Master
Legend-Master previously approved these changes May 15, 2026

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@DominikPeters
DominikPeters force-pushed the fix/menu-window-nsapp-command branch from bec77ff to 15b6386 Compare May 15, 2026 16:05
@DominikPeters

Copy link
Copy Markdown
Contributor Author

Hi! I signed the commit and added a change file.

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

@Legend-Master Legend-Master changed the title fix(tauri): call window NSApp menu setter from JS command fix: set_as_windows_menu_for_nsapp command wrongly called set_as_help_menu_for_nsapp May 15, 2026
@Legend-Master
Legend-Master merged commit 47e1b75 into tauri-apps:dev May 15, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants