[PATCH] protocol: replace the usage of selection with clipboard

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 14 01:19:59 PDT 2014

On Thu, 13 Mar 2014 12:12:41 -0700
Bill Spitzak <spitzak at gmail.com> wrote:

> John Kåre Alsaker wrote:
> > 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).
> In that case this patch makes sense.
> >> 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.
> I believe then that drag & drop can be used for x-style selection.
> The idea is that a client can turn some action (such as a middle mouse 
> click) into the same result as though the user dragged from a selected 
> object and dropped at that point. Hopefully this can be done by reusing 
> as much of the drag & drop api as possible.
> I don't think it has to be any more complex than that. There is only one 
> potential drag source (whichever client last said it was a drag source, 
> there is no attempt to choose from many potential drag sources to find 
> the correct data type). The clients on either end are aware that this is 
> happening so they can disable it or make the result different from drag 
> & drop, though making it identical is encouraged.

DND does not work like that. You cannot start a drag retroactively on
an action that you want to be a drop.

> I do not believe that removing middle-mouse paste (or making it use the 
> clipboard) will be acceptable to X users, so something MUST be done in 
> Wayland.

Yeah, just like taking away the ability of clients to put their windows
exactly where they want on the screen, regardless of the WM.

- pq

More information about the wayland-devel mailing list