SIGN IN SIGN UP
wailsapp / wails UNCLAIMED

Create beautiful applications using Go

0 0 114 Go

fix(darwin): enable real-time systray menu updates while menu is open

Previously, updating a systray menu while it was open would break click
handlers because Menu.Update() destroyed and recreated all menu items
with new IDs. The visible menu still referenced old IDs, causing
"MenuItem #X not found" errors when clicked.

This fix modifies macosMenu.update() to update existing menu items
in-place using the existing C setter functions (setMenuItemLabel,
setMenuItemDisabled, etc.) instead of clearing and rebuilding the
entire menu. This preserves the menuItemID baked into each NSMenuItem.

Fixes #4719

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
L
Lea Anthony committed
0cd2befc2d25fa5bece27a21b9e0afffefa445bb
Parent: c44f5df