Skip to content

macOS + with_panel: access to additional NSPanel options #4670

Description

@mattly

Description

I'm really excited by the with_panel options on the winit beta, but my use case requires the underlying NSPanel to have its isFloatingPanel bit and becomesKeyOnlyIfNeeded bits set. You can do this with objc2-app-kit's NSPanel proxy, but there doesn't seem to be any way to get at that underlying NSPanel from the NSView available from the raw window handle; I can get an NSWindow pretty easily but not the NSPanel.

I'm unsure what the best way to do this would be with the existing structure.

For my use case, I'd be happy to set the bits at window creation time, with something like with_panel(MacOsPanel::default().with_floating(true).with_becomes_key_only_if_needed(true)) were that available.

Relevant platforms

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions