Conversation
|
The hosted run is blocked before compilation by an existing lockfile-generation issue: The cargo-deny failures concern resolved third-party dependency duplicates, packaged scripts in libc/android-activity, and the ttf-parser unmaintained advisory. I have not changed the deny policy or suppressed those findings. Formatting, typos, JavaScript minimization and Windows cargo-deny passed. Independent checks remain green: native macOS library/example Clippy, feature-disabled reproduction, all three feature-enabled Quit modes, and the Linux library suite. A downstream application also fetched this exact public fork commit and passed the three native modes with its pinned dependency lock and strict Clippy. Hosted cross-platform compilation is still unverified because of the lockfile step above. |
Native macOS Quit currently terminates the process without giving window close handlers a chance to review unsaved work. It also prevents
run_app_on_demandfrom returning to code that owns cleanup guards. This adds an opt-inmacos-quit-as-closefeature on the 0.30 maintenance branch; default behavior stays unchanged.applicationShouldTerminate:returnsNSTerminateCancel, records one coalesced request and wakes the run loop. At the next boundary, after initial window creation and outside application callbacks, Winit emitsCloseRequestedfor its own windows. Applications can decline the request or close normally and exit their event loop. With no Winit windows, the event loop exits normally. Native panels retain their own lifetime.The opt-in choice preserves the existing termination policy discussed in #2221. This is application-level close review, not a replacement for signal handling or forced termination. Immediate cancellation may also cancel a system logout/shutdown attempt. Multi-window applications remain responsible for coordinating a single decision; Cargo feature unification enables this for the whole process. Those limits are documented.
The standalone
macos_quitexample uses hidden windows with activation prohibited and no input automation. On an Apple Silicon Mac, the feature-disabled baseline exits 0 without reaching its final marker. With the feature enabled, all three modes pass: Keep open followed by a second Quit, coalesced early requests before initial window creation, and no-window exit. Each verifies return from the event loop and local cleanup. Native Clippy passes for the library and example with warnings denied. The Linux library suite passes all 8 tests; changed Rust files pass the project's nightly rustfmt configuration.Only the feature-enabled runs should print
Returned:. The example has a ten-second failure watchdog; exit status 0 alone is not acceptance. This does not claim native menu/panel visual testing or OS logout testing.