rust-windowing / rust-windowing/winit
macOS + with_panel: access to additional NSPanel options
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
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
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
Review the existing macOS with_panel option and the raw-window-handle path described in the issue; the payload names no files or tests. Define how the underlying NSPanel is exposed or configured, then verify that isFloatingPanel and becomesKeyOnlyIfNeeded can be set at window creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100