dnd: fix drag-and-drop onto panel applets - #675
Open
dahankzter wants to merge 3 commits into
Open
Conversation
Fires on every metadata() call. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCQQAWhxyYJwT49Zvcko6z
action_choice returned `preferred` verbatim whenever no seat had a local dnd_source - that is, on every drag that didn't start inside the panel. A client may leave preferred empty, and libcosmic does, so the action negotiated to "none" and the host compositor refused the drop. Use smithay's default_action_chooser. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCQQAWhxyYJwT49Zvcko6z
The host only sends drop once we have accepted on its offer, and we never did, so every drop onto a panel applet was discarded - the drag ended in leave instead. Applets were receiving enter/motion fine, which is why this looked like it should already work. Needs Source::accepted from Smithay/smithay#2146. Won't build until that lands and the smithay rev here is bumped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCQQAWhxyYJwT49Zvcko6z
jacobgkau
requested changes
Aug 28, 2026
jacobgkau
left a comment
Member
There was a problem hiding this comment.
The PR template that you removed from the description is mandatory. Please add it back and fill it in.
Author
|
Sorry about that @jacobgkau it's back now |
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.
Blocked on Smithay/smithay#2146 — this cannot land until that merges and the smithay rev here is bumped.
Dropping a file onto a panel applet has never worked. Applets get
enterandmotionfine, then the drag ends inleaveandwl_data_device.dropnever arrives, which is why this looks like it should already work from reading the code.Two separate causes, established from a
WAYLAND_DEBUGcapture on the panel:action_choicereturnedpreferredverbatim whenever no seat had a localdnd_source— every drag that didn't start inside the panel. A client may leavepreferredempty and libcosmic does, so the action negotiated to "none" and cosmic-comp refused the drop. Now uses smithay'sdefault_action_chooser.Nothing relayed the applet's
wl_data_offer.acceptup to cosmic-comp. The host only sendsdroponce we've accepted on its offer.Sourcehad no hook to observe that, hence the smithay PR.The first two commits are independent and fine on their own. Only the third needs the new hook.
Tested on COSMIC 1.7.0, with a local
[patch]pointing at a smithay fork (not part of this branch). Dropping onto the applet icon and onto a popup row opened mid-drag both deliver the path. On the wire:drop()from cosmic-comp, forwarded to the applet,receive("text/uri-list", fd)+finish()coming back.Commits carry
Co-Authored-By: Claude Opus 5— this was written with Claude Code, with the diagnosis driven by wire captures rather than guesswork.