diff options
author | Simon Ser <contact@emersion.fr> | 2019-02-20 14:03:55 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-04-04 11:39:08 +0000 |
commit | 307b23626d9fccc4ab9f72b23940f26c54505b0e (patch) | |
tree | 91f4c2e20e244aa3223a42dca832392b40ae0f15 | |
parent | cdd890a6f8701d44641b215549a856e524229373 (diff) | |
download | wayland-307b23626d9fccc4ab9f72b23940f26c54505b0e.tar.gz |
protocol: disallow re-using wl_data_source
As pointed out in [1], re-using a wl_data_source for multiple start_drag or
set_selection requests has bad consequences, because this object has events
that allo tracking the state of a selection/drag-and-drop operation. Tracking
two operations at the same time isn't possible with this interface.
[1]: https://lists.freedesktop.org/archives/wayland-devel/2019-January/039936.html
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | protocol/wayland.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 10e039d..17a1769 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -847,6 +847,7 @@ <enum name="error"> <entry name="role" value="0" summary="given wl_surface has another role"/> + <entry name="used_source" value="1" summary="source has already been used"/> </enum> <request name="start_drag"> @@ -876,6 +877,10 @@ The input region is ignored for wl_surfaces with the role of a drag-and-drop icon. + + The given source may not be used in any further set_selection or + start_drag requests. Attempting to reuse a previously-used source + may send a used_source error. </description> <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the eventual transfer"/> <arg name="origin" type="object" interface="wl_surface" summary="surface where the drag originates"/> @@ -889,6 +894,10 @@ to the data from the source on behalf of the client. To unset the selection, set the source to NULL. + + The given source may not be used in any further set_selection or + start_drag requests. Attempting to reuse a previously-used source + may send a used_source error. </description> <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the selection"/> <arg name="serial" type="uint" summary="serial number of the event that triggered this request"/> |