src/windowserver/WsEventRoutingSpecs.md
WsEventRouting is the pure decision layer for incoming WindowServer notifications: it decodes a raw
notification id into a known Notification, maps each to the model Action it implies, and exposes one
fact the dispatcher needs (whether the payload carries a Space id). It
holds no state and does no IPC — WindowServerEvents turns these decisions into model mutations. Same
pure-decision-kernel pattern as SelectionResolver; it superseded the AX event-routing layer that mapped
AX notifications to these same actions before WindowServer became the source of window state.
Established live on macOS 26 by registering SLSRegisterConnectionNotifyProc across a wide id range and
driving each change: 806 moved, 807 resized, 811 created, 804 destroyed, 815/816 ordered-in/out, 808 the
focused/front window changed (confirmed cross-app and intra-app), 1325/1326 added/removed-from-Space,
1329 current-Space, 1401 active-Space. Notes that shape the actions:
refreshVisibility, after which WsWindowState reads the minimized bit.(spaceId, wid) in the payload — membership is free, no query.acquireAndDiscriminate — the wid may be untracked; we must obtain its AX element
and run WindowDiscriminator before showing it.Mirrors WsEventRoutingTests.swift 1:1.
Notification case.