winit icon indicating copy to clipboard operation
winit copied to clipboard

wayland: register drag & drop events

Open PeakKS opened this issue 1 year ago • 4 comments

~~I tried implementing drag & drop on Wayland, though I don't think it is possible with the current PathBuf based API. The smithay client toolkit provides only a readpipe to get the file content from, and afaict there is no way to get the path from it.~~

Tried a little harder and got it to work, still work to be done e.g. handling multiple file selections.

Related: #1881 #1550

  • [x] Tested on all platforms changed
  • [ ] Added an entry to the changelog module if knowledge of this change could be valuable to users
  • [ ] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • [x] Created or updated an example program if it would help users understand this functionality
  • [ ] Updated feature matrix, if new features were added or implemented

PeakKS avatar Nov 26 '24 23:11 PeakKS

See https://github.com/rust-windowing/winit/pull/2429

it all should still apply.

kchibisov avatar Nov 27 '24 10:11 kchibisov

I think the functionality is correct now.

PeakKS avatar Nov 27 '24 21:11 PeakKS

I haven't made deep testing but in a simple application based on libcosmic with this patch applied, dropping a file on the window works on wayland too! Thanks!

I did not review the code before applying.

zinifier avatar Jan 02 '25 00:01 zinifier

Guys, any ping on this?

markcda avatar Jul 31 '25 12:07 markcda