mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 14:48:34 +01:00
Step 11(ii), the pure part. macOS cannot act on a window from its id: it needs the Accessibility element, the pid and the observer. Registry<H> is that table, generic over the handle so that its rules run on any host. Rules, written at the top of registry.rs and tested: thread-safe; a lookup clones the handle and releases the lock before anything is done to it; a removed or replaced handle is handed back to the caller instead of being dropped under the lock (dropping a macOS handle can make an AX round trip, which must never happen with a lock held: seam.md 3.3); a stale or unknown id is Error::WindowGone, never a panic; an entry ends on remove, remove_pid (application quit) or a failed call; re-inserting replaces. Nothing uses it yet; no daemon changes. Verified: native cargo test -p komorebi-backend: 38 unit (9 new) + 7 doc (1 new) + 1 compile_fail passed, 0 failed. Not run: the Windows, KDE and macOS checks (the new module is std-only and no other file changed).