linebender / linebender/druid

Drag and drop support in druid-shell

Open
#1,742 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement shell
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

This is mentioned in the "longer term future" section of the [druid-shell roadmap](https://github.com/linebender/druid/issues/16). Perhaps we're getting close?

My personal use case is to drag files from the filesystem onto the window, ideally with a sub-window drop location.

For implementation reference, Winit has `DroppedFile` / `HoveredFile` / `HoveredFileCancelled` events for [mac](https://github.com/rust-windowing/winit/blob/b9f3d333e41464457f6e42640793bf88b9563727/src/platform_impl/macos/window_delegate.rs), [windows](https://github.com/rust-windowing/winit/blob/b9f3d333e41464457f6e42640793bf88b9563727/src/platform_impl/windows/drop_handler.rs), and [x11](https://github.com/rust-windowing/winit/blob/c5620efc9c5f44f9755a64359bb9fee9f92a4ded/src/platform_impl/linux/x11/event_processor.rs). I wasn't able to find the precise way this is done in GTK... drag and drop are a little bit overloaded terms.

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 with the druid-shell roadmap issue linked in the description, then inspect druid-shell's existing platform event handling. Use Winit's DroppedFile, HoveredFile, and HoveredFileCancelled implementations for macOS, Windows, and X11 as implementation references. Done means drag-and-drop file events work across the relevant platforms, including a sub-window drop location.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.