Documentation
¶
Overview ¶
Package windowstate keeps crash recovery records while a window owns its lease.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LaunchInbox ¶
type LaunchInbox[T any] struct { // contains filtered or unexported fields }
LaunchInbox forwards desktop launches to the process that owns the windows. Atomic files retain requests across startup and native event coalescing.
func ForwardLaunch ¶
func ForwardLaunch[T any](dir string, request T, wake func()) (*LaunchInbox[T], error)
ForwardLaunch returns nil after handing the request to a running instance.
func (*LaunchInbox[T]) Close ¶
func (q *LaunchInbox[T]) Close()
func (*LaunchInbox[T]) Drain ¶
func (q *LaunchInbox[T]) Drain(lastWindowClosed bool, receive func(T)) error
Drain releases the lease under the dispatch lock when the last window closes and no launch is waiting. A concurrent launch can then become the next owner.
type Window ¶
func Open ¶
Open restores all windows on a cold application launch. A live lease means the application is already running; another launch then opens a fresh window. Explicit restore IDs identify additional windows of a cold launch.