[PATCH] protocol: replace the usage of selection with clipboard
John Kåre Alsaker
john.kare.alsaker at gmail.com
Thu Mar 13 10:01:18 PDT 2014
On Wed, Mar 12, 2014 at 7:32 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> Isn't Wayland differentiating between the "selection" and the clipboard?
It is not doing that at the moment. Only explicit clipboard actions
are supposed to be used.
>
> The selection is changed when the user selects an object.The clipboard is
> changed only when the user does a cut or copy operation.
There is no such thing as a selection in the Wayland protocol, even
though things are named 'selection'. It actually just refers to the
clipboard (or so I'm told).
>
> There is also drag & drop. Though in most cases this can be the same as the
> selection, I think there was some pathological examples showing that it has
> to be it's own piece of data.
Drag and drop is separate from the clipboard in the protocol.
>
> One of the patches changed "selection" to "data source", maybe "data source"
> is a better name?
That was because it was referring to a data source being cancelled,
not a clipboard data source specifically. It might be used for drag
and drop too.
>
> I also am trying to reattach the patch here because for some reason it did
> not show up at text in my email:
>
> From abe49cf93128063d55cf881658b30b99d892ae53 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= <john.kare.alsaker at gmail.com>
> Date: Wed, 12 Mar 2014 15:28:52 +0100
> Subject: [PATCH] protocol: replace the usage of selection with clipboard
>
> Make it clear that we're dealing with a clipboard and not X-style selections
> in the protocol.
> ---
> protocol/wayland.xml | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 3aa89af..7a1efdd 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -508,7 +508,7 @@
> </event>
>
> <event name="cancelled">
> - <description summary="selection was cancelled">
> + <description summary="data source was cancelled">
> This data source has been replaced by another data source.
> The client should clean up and destroy this data source.
> </description>
> @@ -559,11 +559,11 @@
> </request>
>
> <request name="set_selection">
> - <description summary="copy data to the selection">
> - This request asks the compositor to set the selection
> + <description summary="copy data to the clipboard">
> + This request asks the compositor to change the clipboard data
> to the data from the source on behalf of the client.
>
> - To unset the selection, set the source to NULL.
> + To empty the clipboard, set the source to NULL.
> </description>
> <arg name="source" type="object" interface="wl_data_source"
> allow-null="true"/>
> <arg name="serial" type="uint" summary="serial of the event that
> triggered this request"/>
> @@ -574,7 +574,7 @@
> The data_offer event introduces a new wl_data_offer object,
> which will subsequently be used in either the
> data_device.enter event (for drag-and-drop) or the
> - data_device.selection event (for selections). Immediately
> + data_device.selection event (for clipboard data). Immediately
> following the data_device_data_offer event, the new data_offer
> object will send out data_offer.offer events to describe the
> mime types it offers.
> @@ -626,14 +626,14 @@
> </event>
>
> <event name="selection">
> - <description summary="advertise new selection">
> + <description summary="advertise new clipboard data">
> The selection event is sent out to notify the client of a new
> - wl_data_offer for the selection for this device. The
> + wl_data_offer for the clipboard for this device. The
> data_device.data_offer and the data_offer.offer events are
> sent out immediately before this event to introduce the data
> offer object. The selection event is sent to a client
> - immediately before receiving keyboard focus and when a new
> - selection is set while the client has keyboard focus. The
> + immediately before receiving keyboard focus and when new
> + clipboard data is set while the client has keyboard focus. The
> data_offer is valid until a new data_offer or NULL is received
> or until the client loses keyboard focus.
> </description>
> --
> 1.8.4.msysgit.0
>
>
More information about the wayland-devel
mailing list