rust-windowing / rust-windowing/winit

Handle file promises on MacOS

Open
#2,201 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

D - average DS - appkit H - good first issue H - help wanted S - api S - enhancement
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

Hi, I'm not sure how this works in windows or linux(will try to check) but in MacOS when you drag something(let's say an image) from a browser or another application, OS returns not NSFilenamesPboardType but NSFilesPromisePboardType which should be handled differently.
I think it could be done in the handler that will extract the file URL from a promise and fire up an event with PathBuf like if it was a file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the macOS drag-and-drop handler that processes NSFilenamesPboardType, then trace how dropped paths become PathBuf events. Compare that flow with NSFilesPromisePboardType and verify on macOS that promised files from a browser or another application produce the same file event as ordinary dragged files.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.