protocol: reorder wl_data_offer.source_actions and wl_data_device.enter
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>
Wed, 21 Sep 2022 14:42:58 +0000 (17:42 +0300)
committerSimon Ser <contact@emersion.fr>
Mon, 27 Feb 2023 20:43:41 +0000 (20:43 +0000)
Most compositors send the wl_data_offer.source_actions event before the
wl_data_device.enter event, i.e. after creation of the data offer. This
contradicts to the wayland spec.

On the other hand, it's reasonable to send all the information useful to
the client before the enter event, rather than send mime types before the
enter event and source actions (that don't depend on drop target) after
the enter event.

On the client side, toolkits such as Qt and GTK already expect to see the
source actions before receiving the enter event.

Given all of that, this change adjusts the spec to match the behavior
observed in the compositors in the wild.

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
protocol/wayland.xml

index 07cd6bc..0ab57b8 100644 (file)
     <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.
+       will be sent immediately after creating the wl_data_offer object,
+       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"/>