LocalNSWindow
Composition local exposing the macOS host's NSWindow. CMP 1.11+ provides WindowScope.window as a receiver only — there is no built-in composition local — so the host has to install one for any code below it that needs the window. Use ProvideNSWindow inside a Window { … } block:
Window(title = "App") {
ProvideNSWindow {
AppRootScreen()
}
}Content copied to clipboard
Defaults to null; consumers (e.g. WindowLifecycleSubscribable.AttachToCompose) silently no-op when no window is installed.