Expand description
Fixes and additions to the windowing library’s macOS application shell (winit 0.30):
guard_appearance: the window delegate observeseffectiveAppearanceand casts the old and new values toNSAppearanceunchecked. While the screen is being captured (ScreenCaptureKit, ReplayKit) AppKit can report a nil appearance, and the cast ends the process. The guard checks the values first and drops such a change.listen_reopen: clicking the Dock icon (or opening the app again in Finder) asks the application delegateapplicationShouldHandleReopen:hasVisibleWindows:, which winit doesn’t answer, so a hidden window stays hidden. The method is added and reported, so the app shows and focuses its window.quiet_requested:<PREFIX>_QUIET=1asks for a launch that doesn’t take the focus, for agents and scripts that rebuild and relaunch the app in a loop. The app then opens its window without activating (an ashlar app does this itself).
The first two return NativeError::Unsupported off macOS.
Structs§
- Reopen
- The Dock (or Finder) asked to reopen the app.
Functions§
- guard_
appearance - Guard the window delegate’s appearance observer (see the module docs). Call it on the main thread once a window exists (the delegate class is registered with the first window). Calling again does nothing.
- listen_
reopen - Report Dock reopen requests: each one is queued on the returned receiver and
wakeris called. Main thread, once the event loop runs (winit’s delegate must exist). Calling again moves the reports to the new receiver. - quiet_
requested <env_prefix>_QUIETis set to something other than empty,0,false,nooroff.