Skip to content

wayland/data-offer: Accept final preferrence of drop destination

Robert Mader requested to merge rmader/mutter:issue1952 into main

Quoting the spec for wl_data_device::drop:

If the resulting action is "ask", the action will not be considered final. The drag-and-drop destination is expected to perform one last wl_data_offer.set_actions request, or wl_data_offer.destroy in order to cancel the operation.

We did not respect the action choosen by the drop destination when it called wl_data_offer::set_actions after wl_data_device::drop if a user override was still active. This eventually resulted in a protocol error in wl_data_offer::finish, as the current action could still be ask.

Fix this by only allowing a user override to ask before drop is called, thus making sure the final set_actions preference is honored.

Closes #1952 (closed)

Edited by Robert Mader

Merge request reports