Repository navigation
waylandbridge: emit drag-and-drop drop before pointer release - #90
Merged
superturtlee merged 1 commit intoSep 28, 2026
Merged
Conversation
End the compositor-owned drag before forwarding the tracked button release. Firefox treats an earlier wl_pointer release as cancellation and never completes the data offer, while Chromium still receives the paired release immediately after the drop.
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.
Summary
Emit the compositor-owned drag-and-drop completion before forwarding the physical
pointer-button release.
Firefox can interpret
wl_pointer.button(released)as cancellation when it arrivesbefore
wl_data_device.drop(). This results inpointerup/dragendwithout a DOMdrop, leaving the Wayland data offer unfinished.Change
tr_ptr_button()now callsawl_datadev_drag_end()before forwarding the trackedpointer release.
The paired release is still forwarded afterward because Chromium requires a balanced
pointer press/release sequence.
The resulting order is:
Untracked releases remain consumed as before.
Testing
Tested with LibreWolf running as a native Wayland client:
wl_data_source.dnd_finished().
The change was also rebuilt successfully against the current upstream main.
Environment
Scope
This PR only changes DnD event ordering. A separate frame-callback lifecycle race
discovered during testing is handled independently in fix/frame-callback-dispatch-gc.