#582

Open macOS submenus when their parent item is clicked

Openjyecuschwants to merge intofrom

On macOS, clicking a menu item that has a submenu (rather than hovering it) closes the whole menu, and fires tray-clicked with an empty action. This happens for tray, application and context menus.

createMenuFromConfig gives every item the menuItemClicked: action and a target, including parents. setSubmenu:forItem: leaves them in place. Clearing both on items with a submenu lets AppKit handle the click by opening the submenu, which is the standard macOS behaviour.

Tested with a tray menu on macOS 26.