More about clipboard and selection in wayland
Yichao Yu
yyc1992 at gmail.com
Sat Mar 30 20:39:04 PDT 2013
Hi,
I have already sent a email about the clipboard and selection in
wayland a few weeks ago[1] (mainly about middle button paste). After
reading more about clipboard and selection protocol in wayland, I have
more questions about the limitation of the protocol.
1, as mentioned in my previous email[1], there is no support for
middle button paste right now. This is totally different from either
normal clipboard or dnd. (p.s. If this is added in the future, what
should be the name of it since the clipboard right now is taking the
name "selection").
2, about clipboard manager (or the similar function provided by
clipboard manager in X11). The bear protocol doesn't seems to support
selection access after a program quit (not to mention other advanced
features provided by clipboard manager like clipboard history). Krh
mentioned in a bug report[2] that there is a more advanced
implementation in weston now, but the only thing I have found that may
be related is the src/clipboard.c file in weston, which at least
doesn't work out-of-box for weston-terminal. Is that a simple
implementation of clipboard manager in the compositor? Any
documentation how it should work? Haven't found any documentation
about what the application should do (e.g. info the clipboard manager
or at least the compositor about going to exit) in order to support
it. IMHO, it is still a good idea to make it possible for having a
standalone clipboard manager to provide some advanced feature.
3, about clipboard access and monitoring. According to the protocol,
the client will only receive wl_data_device::data_offer event and the
wl_data_offer object will only be valid when the client has a input
focus. Why is this constraint added, This means 1) It is impossible to
monitor the clipboard (since the client will not always have a focus)
2) it is impossible for a cli clipboard access, both of which are
useful features that are possible (and easy) to implement in X. Having
to provide a serial and having ::accept and ::recieve as separate
request/event make this even harder. Is there any reason this is
designed in such a way?
[1] http://www.mail-archive.com/wayland-devel@lists.freedesktop.org/msg07467.html
[2] https://bugs.freedesktop.org/show_bug.cgi?id=52077#c1
Yichao Yu
More information about the wayland-devel
mailing list