diff --git a/mac/Sources/Wind/Crosshair.swift b/mac/Sources/Wind/Crosshair.swift
index 393fa150..6870b4f7 100644
--- a/mac/Sources/Wind/Crosshair.swift
+++ b/mac/Sources/Wind/Crosshair.swift
@@ -82,6 +82,7 @@ final class Crosshair {
p.ignoresMouseEvents = true
p.level = .screenSaver
p.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .stationary, .ignoresCycle]
+ p.canHide = false // see WindCursor
let v = NSView()
v.wantsLayer = true
outline.strokeColor = NSColor.black.withAlphaComponent(0.6).cgColor
diff --git a/mac/Sources/Wind/DrawZoom.swift b/mac/Sources/Wind/DrawZoom.swift
index 410431cc..bf59f390 100644
--- a/mac/Sources/Wind/DrawZoom.swift
+++ b/mac/Sources/Wind/DrawZoom.swift
@@ -711,6 +711,7 @@ final class DrawZoom: NSObject, SCStreamOutput, SCStreamDelegate, @unchecked Sen
w.animationBehavior = .none
w.isReleasedWhenClosed = false
w.collectionBehavior = [.canJoinAllSpaces, .stationary, .fullScreenAuxiliary, .ignoresCycle]
+ w.canHide = false // see WindCursor
let v = NSView(frame: CGRect(origin: .zero, size: screen.frame.size))
v.wantsLayer = true
v.layer?.backgroundColor = NSColor.black.cgColor
diff --git a/mac/Sources/Wind/SettingsWeb.swift b/mac/Sources/Wind/SettingsWeb.swift
index 92dd51c9..30cfb9e8 100644
--- a/mac/Sources/Wind/SettingsWeb.swift
+++ b/mac/Sources/Wind/SettingsWeb.swift
@@ -46,7 +46,7 @@ final class SettingsWindowController: NSObject, WKScriptMessageHandler, WKNaviga
let ucc = WKUserContentController()
ucc.add(WeakHandler(self), name: "wind")
cfg.userContentController = ucc
- let web = WKWebView(frame: NSRect(x: 0, y: 0, width: 1040, height: 720), configuration: cfg)
+ let web = DragWebView(frame: NSRect(x: 0, y: 0, width: 1040, height: 720), configuration: cfg)
web.navigationDelegate = self
web.setValue(false, forKey: "drawsBackground") // the window's dark fill shows until the page paints
let w = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1040, height: 720),
@@ -78,6 +78,9 @@ final class SettingsWindowController: NSObject, WKScriptMessageHandler, WKNaviga
return
}
#endif
+ // A regular app while the window is open: a Dock icon and Cmd+Tab entry, and the window moves
+ // aside for Show Desktop like any other (an accessory app's window stayed put, owner 2026-11-11).
+ NSApp.setActivationPolicy(.regular)
NSApp.activate(ignoringOtherApps: true)
w.makeKeyAndOrderFront(nil)
}
@@ -161,6 +164,7 @@ final class SettingsWindowController: NSObject, WKScriptMessageHandler, WKNaviga
if s("action") == "fixZoomShortcuts" { fixZoom?() } else { macAction?(s("action"), s("value")) }
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { [weak self] in self?.pushMacStatus() }
case "captureBinds": onCapture?(s("on") == "1")
+ case "titleBand": (web as? DragWebView)?.contentBandFree = s("on") == "1"
case "dirty", "saveSession", "discardSession": break // no sessions on the Mac
default: Log.verbose("settings: unknown message \(type)")
}
@@ -257,6 +261,7 @@ final class SettingsWindowController: NSObject, WKScriptMessageHandler, WKNaviga
onboarding = false
window?.contentView = nil
web = nil; window = nil
+ NSApp.setActivationPolicy(.accessory) // back to a menu-bar agent: no Dock icon
}
/// An agent app has no menu bar, so the web view would get no Cut/Copy/Paste/Select All/Close keys.
@@ -356,3 +361,30 @@ extension SettingsWindowController {
func testClose() { window?.performClose(nil) }
}
#endif
+
+/// The page covers the whole window (transparent title bar), so the web view takes every click and the
+/// window could not be dragged. The title bar band (and the empty top of the sidebar, beside the traffic
+/// lights) drags the window, and a double click there zooms it, as in a native title bar. The page keeps
+/// those bands free of controls (Sidebar.svelte's top padding; the page banner, reported by `titleBand`).
+final class DragWebView: WKWebView {
+ static let titleBand: CGFloat = 28, sideBand: CGFloat = 40, sideWidth: CGFloat = 240, narrow: CGFloat = 700, lights: CGFloat = 84
+
+ /// The page column's top band holds only the page banner (scrolled to the top). Scrolled, controls pass
+ /// under it and keep their clicks; the page reports it (`titleBand`).
+ var contentBandFree = true
+
+ static func dragsWindow(at p: NSPoint, width: CGFloat, contentFree: Bool) -> Bool {
+ if width <= narrow { return p.y < titleBand && p.x < lights } // narrow: the strip's left gap only
+ if p.x < sideWidth { return p.y < sideBand }
+ return contentFree && p.y < titleBand
+ }
+
+ override func mouseDown(with e: NSEvent) {
+ let p = convert(e.locationInWindow, from: nil)
+ let y = isFlipped ? p.y : bounds.height - p.y
+ guard let w = window, DragWebView.dragsWindow(at: NSPoint(x: p.x, y: y), width: bounds.width, contentFree: contentBandFree) else {
+ super.mouseDown(with: e); return
+ }
+ if e.clickCount == 2 { w.performZoom(nil) } else { w.performDrag(with: e) }
+ }
+}
diff --git a/mac/Sources/Wind/WindCursor.swift b/mac/Sources/Wind/WindCursor.swift
index c2705486..79bbdfdb 100644
--- a/mac/Sources/Wind/WindCursor.swift
+++ b/mac/Sources/Wind/WindCursor.swift
@@ -201,6 +201,10 @@ final class WindCursor {
p.ignoresMouseEvents = true
p.level = NSWindow.Level(rawValue: NSWindow.Level.screenSaver.rawValue + 1) // above the crosshair
p.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .stationary, .ignoresCycle]
+ // Wind is a regular, hideable app while Settings is open (Hide Others, the owner's Win+D script):
+ // hiding it must take only the Settings window. An overlay hidden with the app was ordered back
+ // in a tick later, which unhid the whole app and brought Settings back (owner 2026-11-11).
+ p.canHide = false
let v = NSView()
v.wantsLayer = true
image.contentsGravity = .resize
diff --git a/mac/Sources/Wind/WindShot.swift b/mac/Sources/Wind/WindShot.swift
index 3773e25c..0aed4886 100644
--- a/mac/Sources/Wind/WindShot.swift
+++ b/mac/Sources/Wind/WindShot.swift
@@ -392,6 +392,7 @@ final class ShotPanel {
p.ignoresMouseEvents = true
p.level = NSWindow.Level(rawValue: NSWindow.Level.screenSaver.rawValue + 1)
p.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .stationary, .ignoresCycle]
+ p.canHide = false // see WindCursor
let v = NSView()
v.wantsLayer = true
v.layer?.addSublayer(layers.root)
diff --git a/mac/VERSION b/mac/VERSION
index 659914ae..416bfb0a 100644
--- a/mac/VERSION
+++ b/mac/VERSION
@@ -1 +1 @@
-0.5.8
+0.5.9
diff --git a/mac/docs/architecture.md b/mac/docs/architecture.md
index 9a6fb8a0..c018edf7 100644
--- a/mac/docs/architecture.md
+++ b/mac/docs/architecture.md
@@ -1080,6 +1080,10 @@ caret following off. Each Tab must move the view onto the focused button; passes
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).
+- **A normal window while open** (0.5.9): Wind turns into a regular app (Dock icon, Cmd+Tab, moves aside for
+ Show Desktop) and back to a menu-bar agent when it closes. The page covers the transparent title bar, so
+ `DragWebView` drags the window from the top 28 px (only while the page sits at the top, reported by `titleBand`)
+ and the empty top of the sidebar; a double click there zooms.
- **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`.
diff --git a/mac/ui/src/Settings.svelte b/mac/ui/src/Settings.svelte
index 8b57c8b5..268f15b4 100644
--- a/mac/ui/src/Settings.svelte
+++ b/mac/ui/src/Settings.svelte
@@ -11,7 +11,7 @@
import '$shared/design/themes.css';
import { groups, missingPermissions } from './settings-schema.js';
import { getSession, setConfig, openIni, exportDiagnostics, windowControl, onMessage,
- getMacStatus, onMacStatus, macAction } from './bridge.js';
+ getMacStatus, onMacStatus, macAction, titleBand } from './bridge.js';
import { fill } from './session.js';
import { themes, normalizePalette } from '$shared/design/themes.js';
import { capturing } from './lib/capture.js';
@@ -155,6 +155,15 @@
const advOn = $derived(Number(values.showAdvanced) === 1);
const shown = (r) => visible(r) && (!r.adv || advOn);
const extra = $derived({ version: VERSION, mac, onAction, onMacAction });
+
+ // Tell the host when the top of the page column holds only the banner, so it can drag the window there
+ // (DragWebView). Scrolled or searching, controls sit under that band and keep their clicks.
+ let bandFree = null;
+ function reportBand() {
+ const free = !searching && (!main || main.scrollTop < 1);
+ if (free !== bandFree) { bandFree = free; titleBand(free); }
+ }
+ $effect(() => { searching; activeId; queueMicrotask(reportBand); });