Open trimental opened 5 years ago
I think this implementation is a bit troublesome since it does not use the ClipboardProvider
trait, so that would make it pretty difficult for the consumers to abstract over different platforms.
I've got an alternative implementation here: https://github.com/chrisduerr/rust-clipboard
There are a few specifics to do with wayland design that sets this implementation apart from others such as x11
new_threaded()
method takes care of this using a thread that continuously dispatches those eventsseat0
as multiple seats are an exotic thing in the wayland ecosystem however it can be changed with theset_seat()
function.I've left the default
ClipboardContext
set toX11ClipboardContext
on linux and I think that allowing the user to directly useWaylandClipboardContext
at their discretion to fit their needs would be a good enough API.I've also added a wayland example to test out the implementation.