Repository navigation
Conversation
Applications such as file managers need outgoing file drags, incoming offers with their MIME types, Copy/Move negotiation and asynchronous completion. The existing file-drop window events expose none of that. Add `runtime::window::drag_drop`: renderer-neutral `DragDrop`, offer and source handles with retained snapshots and coalesced change streams, an opaque origin capability for the pressed left button, bounded byte I/O futures, and `drag_drop::enable(id)` (`Action::EnableDragDrop`) to opt a window in. The `winit` shell implements them on top of winit's Wayland data-device endpoint; other backends return `None`. No data device is created until a window asks for one. Requires winit's `WindowExtWayland::drag_drop`; `Cargo.toml` patches winit to the fork commit that provides it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canopa fork tracking PR. Its diff against
canopa/base(595af03, the tip of upstream's0.14branch wheniced_widget0.14.2 was released.iced_winitandiced_runtimethere are identical to the 0.14.0 release,3997291) is exactly the change Canopa carries iniced_winit/iced_runtime. It is merged intocanopa/main, which Canopa builds. This PR stays open until the change is upstreamed or dropped.What
iced_runtime::window::drag_drop: renderer-neutralDragDrop,OfferandSourcehandles with retained snapshots and coalesced notices, an opaqueOrigincapability for the pressed left button, bounded byte I/O, anddrag_drop::enable(id)/Action::EnableDragDropto opt a window in.iced_winit::drag_drop: an adapter onto winit's Wayland data-device endpoint. Other backends returnNone, and no data device exists until a window opts in.winit pin: the root
Cargo.tomladds[patch.crates-io] winit = { git = "https://github.com/kevinard/winit", rev = "eeaff073f326…" }, pointing at kevinard/winitcanopa/wayland-drag-drop(data-device drag and drop).Cargo.lockis updated to match.canopa/mainpins winit'scanopa/maininstead.Why
Canopa Files needs outgoing file-URI drags, incoming offers, Copy/Move negotiation and asynchronous completion, with no file-manager policy in the shared toolkit. See Canopa ADR 0023 (and Files ADR 0094).
Verification
cargo check --locked --all-targets -p iced_winit -p iced_runtime -p iced_test(default features) andcargo check --locked -p iced --no-default-features --features advanced,wgpu,crisp,web-colors,thread-pool,wayland,image(Canopa's selection) pass at this branch. The only warning is the pre-existingf32::INFINITYdeprecation iniced_widget.cargo test --locked -p iced_winit -p iced_runtime --libpasses.Upstream
Keep this locally until an upstream API is agreed. winit 0.31 has its own data-transfer API (rust-windowing/winit#4571), and this adapter should move to it when iced moves to 0.31.
🤖 Generated with Claude Code