Summary
A window launched with --system-tray never becomes key, so every left click inside it is swallowed as first-mouse activation. Right clicks work, because a context menu does not need a key window — which makes this present as "the page renders perfectly and the buttons are dead".
Cause
main.zig:
if (self.system_tray == null and !self.headless) {
macos.showAllWindows();
// Windowed app: claim regular activation (Dock icon, key
// window, foreground) — launching from a bare binary would
// otherwise leave the window buried with no Dock presence.
macos.activateWindowedApp();
} else if (self.headless) {
macos.setAccessoryActivationPolicy();
}With a system tray configured, system_tray != null, so neither branch runs. activateWindowedApp() is the function that does both halves of the job:
pub fn activateWindowedApp() void {
...
_ = msgSend1(app, "setActivationPolicy:", @as(c_long, 0)); // Regular
...makeKeyAndOrderFront / activate...
}So a tray app never claims NSApplicationActivationPolicyRegular and is never activated. The window is ordered on screen but cannot become key.
acceptsFirstMouse: is not overridden anywhere in the tree, so the webview does not opt out of first-mouse either.
Reproduce
craft http://localhost:3000 --system-tray --width 380 --height 620with any page containing a button. Left-click it: nothing. Right-click anywhere: the context menu appears.
Dropping --system-tray alone fixes it.
Expected
A tray app that also has a window should still be able to take clicks in that window. The two are not mutually exclusive — a VPN or a cleaner has both a menu bar item and a main window.
Workaround
Reachable from the page, which is how we are shipping around it today:
craft.app.showDockIcon() // sets NSApplicationActivationPolicyRegular
craft.window.focus() // makeKeyAndOrderFrontSuggested fix
Run the activation branch whenever a window exists, independently of whether a tray does — menubarOnly / headless are the cases that genuinely want no activation, not systemTray.
Environment
- craft 0.0.90 (also present in
mainat 0.0.359 — the branch is unchanged) - macOS 26 (Darwin 25.3.0), arm64