rust-windowing / rust-windowing/winit
macOS: Documentation claims winit won't register application delegate, but it does (and panics if replaced)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Description
The macOS platform documentation (for v0.30.12) states:
Instead, Winit guarantees that it will not register an application delegate, so the solution is to register your own application delegate [...]
https://docs.rs/winit/0.30.12/winit/platform/macos/
However, this is not accurate in v0.30.12. Winit does register its own ApplicationDelegate (WinitApplicationDelegate), and will panic if you replace it with your own.
https://github.com/rust-windowing/winit/blob/v0.30.12/src/platform_impl/macos/event_loop.rs#L240
https://github.com/rust-windowing/winit/blob/v0.30.12/src/platform_impl/macos/app_state.rs#L174-L183
macOS version
Doesn't matter to this issue, it's macOS-specific, but in the documentation.
Winit version
v0.30.12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the macOS platform documentation for winit 0.30.12 and compare its application-delegate statement with the linked sections in src/platform_impl/macos/event_loop.rs and app_state.rs. Update the documentation so it accurately describes WinitApplicationDelegate registration and replacement behavior, then verify the rendered wording against those implementation references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100