Wayland cut/copy/paste better than in X11?

Giulio Camuffo giuliocamuffo at gmail.com
Tue Apr 16 02:13:36 PDT 2013


2013/4/16 Jiergir Ogoerg <f35f22fan at gmail.com>

> Hi,
> Between application running on X11 apparently there's no standard way to
> tell if file(s) (their URIs) have been "cut" or "copied" into the
> clipboard, so you don't know what to do on "Paste", so people invented
> (silly) workarounds as explained here [1]:
>
> "Since there is no standard way to copy and paste files between
> applications on X11, various MIME types and conventions are currently in
> use. For instance, Nautilus expects files to be supplied with a
> x-special/gnome-copied-files MIME type with data beginning with the
> cut/copy action, a newline character, and the URL of the file."
>
> I wonder if the Wayland protocol allows for a proper/easy solution to this
> problem (I'm talking about cut/copy/paste, not drag-n-drop), like an
> additional uint32_t info field to code the type of action into it, not just
> the URI strings?
>

No, currently it doesn't. Actually, there is no action field for drag and
drop either. I made a patch, but it's still pending:
http://lists.freedesktop.org/archives/wayland-devel/2013-March/007931.html
That should however also work for selection, beside drag and drop.


>
> I looked here [2] and wl_data_device::set_selection_arguments has a "uint
> serial" field but I'm not sure if it's meant to solve this problem or for a
> different reason.
>

It's not related. The serial field is provided by the compositor in certain
input events, and is used to make sure set_selection is called because of
an input event.


>
> Can anyone please explain?
>
>
> [1] http://qt-project.org/doc/qt-4.8/qclipboard.html
> [2]
> http://wayland.freedesktop.org/docs/html/protocol-spec-interface-wl_data_device.html
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130416/74b570cd/attachment.html>


More information about the wayland-devel mailing list