Register the menu-bar Objective-C methods with the selector type purego expects.

The status-item class was never registered, so the tray treated a failed setup as success. Smoke now fails closed until the class exists.

Co-authored-by: George Lambert <marchon@gmail.com>
This commit is contained in:
Cursor Agent 2026-10-05 16:23:23 +00:00
commit 970061d689
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -246,7 +246,7 @@ func registerAirDropCategory() {
runtime.KeepAlive(cat)
}
func didReceiveAirDrop(self, _cmd, center, response, completion objc.ID) {
func didReceiveAirDrop(self objc.ID, _cmd objc.SEL, center, response, completion objc.ID) {
action := ""
if response != 0 {
action = objcUTF8(objc.Send[objc.ID](response, objc.RegisterName("actionIdentifier")))

View file

@ -283,12 +283,12 @@ func registerTrayClass() error {
return nil
}
func menuWillOpen(self, _cmd, menu objc.ID) {
func menuWillOpen(self objc.ID, _cmd objc.SEL, menu objc.ID) {
defer func() { _ = recover() }()
rebuildDarwinMenu(menu)
}
func trayAction(self, _cmd, sender objc.ID) {
func trayAction(self objc.ID, _cmd objc.SEL, sender objc.ID) {
defer func() {
if r := recover(); r != nil {
log.Printf("netprint tray: menu action panic: %v", r)