fix: replace CARemoteLayerServer with CAContext+CALayerHost for cross-process GUI
Sitar118
0548359
Three bugs killed the GUI:
1. CARemoteLayerServer does not capture a hidden NSWindow's content cross-process.
Replaced with CAContext (server) + CALayerHost (client) — the correct private-but-stable
macOS API for cross-process layer embedding, stable from 10.10 through Sequoia.
2. NSWindow was never orderFront: — WindowServer never composited its content.
Fixed: window positioned at (-32000,-32000) and orderFront: called.
3. NSMachBootstrapServer (deprecated on 13+) no longer needed.
contextId (uint32_t) is sent directly over the existing IPC socket.
New file: Source/Shared/PrivateCA.h — declares CAContext, CALayerHost, CGSMainConnectionID.
COMPLETE REWRITE to proper solution:
- Plugin runs in Helper process (crash-safe, like v0.2)
- GUI renders in Helper via CARemoteLayerServer
- PluginBridge.vst3 displays it via CARemoteLayerClient (CALayer inside its own editor)
- Mach port transferred via NSMachBootstrapServer (named port per PID)
- Mouse/keyboard events forwarded from host → helper via Unix socket IPC
- Audio routes via shared memory (same as v0.2)
This gives BOTH crash safety AND GUI inside Ableton's window (including fullscreen).
Based on: Apple's CARemoteLayerServer/Client public API (macOS 10.7+)
Reference: krevis/RemoteLayerDemo on GitHub"