Inconsistent implementation of wl_data_offer.source_actions
<event name="source_actions" since="3">
<description summary="notify the source-side available actions">
This event indicates the actions offered by the data source. It
will be sent right after wl_data_device.enter, or anytime the source
side changes its offered actions through wl_data_source.set_actions.
</description>
<arg name="source_actions" type="uint" summary="actions offered by the data source"
enum="wl_data_device_manager.dnd_action"/>
</event>
According to the spec, the wl_data_offer.source_actions
event must be sent right after wl_data_device.enter
, but Wayland compositors such as mutter, weston, and every wlroots-based compositor don't follow that and send it before the enter event.
kwin sends the wl_data_offer.source_actions
event as indicated in the spec, but it seems like some clients (Firefox) don't like that and it can lead to drag-and-drop not working reliably there. Update: we updated kwin so it sends wl_data_offer.source_actions
before wl_data_device.enter
too.
Sending source actions before the data device enter event makes sense, the client will have the source actions when it receives the enter event, but this inconsistency needs to be resolved. I suggest to update the spec so it says that the source_actions event is sent immediately after creation of wl_data_offer
similar to wl_data_offer.offer
.