Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mac/Sources/Wind/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
!c.onboarded || !accessibility || (c.engine == "draw" && !screenRecording)
}

/// Opening Wind again while it runs (Spotlight, Finder, the Dock, `open -a Wind`) shows Settings:
/// a menu-bar agent has no window for macOS to bring forward, so the reopen did nothing before.
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
let setup = AppDelegate.needsSetup(mag.config, accessibility: AXIsProcessTrusted(),
screenRecording: CGPreflightScreenCaptureAccess())
Log.info("reopened: showing \(setup ? "setup" : "Settings")")
showSettings(onboard: setup)
return false
}

func applicationWillTerminate(_ n: Notification) {
mag.stop()
HIDGain.shared.restoreNow()
Expand Down
2 changes: 1 addition & 1 deletion mac/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.7
0.5.8
2 changes: 2 additions & 0 deletions mac/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,8 @@ caret following off. Each Tab must move the view onto the focused button; passes

## Settings window (2026-11-01)
Spec and plan: `~/Documents/Claude/research/wind-mac/2026-11-01-settings-port-spec-plan.md`.
- **Opening Wind again** while it runs (Spotlight, Finder, `open -a Wind`) opens this window, or the
setup when `needsSetup` holds (`applicationShouldHandleReopen`, 0.5.8).
- **Page:** `ui/` is Windows Wind's Svelte settings UI (copied at Wind commit `982e162`, see
`ui/README.md`), adapted for the Mac. `scripts/build.sh` builds `ui/dist` and bundles it as
`Wind.app/Contents/Resources/ui`.
Expand Down
Loading