Skip to content

macOS: Documentation claims winit won't register application delegate, but it does (and panics if replaced) #4458

@SuchAFuriousDeath

Description

@SuchAFuriousDeath

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    B - bugDang, that shouldn't have happenedDS - appkitAffects the AppKit/macOS backendS - docsAwareness, docs, examples, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions