Cloudef / orbment

Modular Wayland compositor
Other
246 stars 16 forks source link

Synchronize X11 clipboard with compositor clipboard. #47

Open Cloudef opened 9 years ago

Cloudef commented 9 years ago

Currently you can't copy between X11 and wayland views.

onny commented 9 years ago

Gnome Mutter has clipboard synchronization now, see https://mail.gnome.org/archives/gnome-announce-list/2015-May/msg00030.html Maybe we can reuse this implementation here?

onny commented 9 years ago

Here's the commit https://git.gnome.org/browse/mutter/commit/?id=4fc1811c15f0caf342aa7c87ee75366144bea5a8 And this is the bug report https://bugzilla.gnome.org/show_bug.cgi?id=738312

Earnestly commented 9 years ago

It makes heavy use of gtk+ and glib and it's still almost 1000 lines of code. This is scary stuff.

Cloudef commented 9 years ago

Yeah, I'm aware of these links. We probably don't want to pull in gdk and glib. Weston has this code too actually. But I'm still avoiding this as the X11 clipboard is really pita and easy to get wrong.

It might make sense to do libclipboard that abstracts all these crap away. I've always wanted cross-platform clipboard solution that doesn't just use system("xclip"), and supports the mime conversions. Though it's lots of boring code.

onny commented 9 years ago

Hm, I guess one does only need something like libclipboard in case of downwards compatibility to Xorg clipboard, right? Is it possible to create a seperate application, which can be run as a daemon in the background, to provide clipboard synchronization? This app could open some kind of dummy Xorg client to access the clipboard content etc.

Cloudef commented 9 years ago

I was planning to do clipboard synchronization / history either as plugin or introduce protocol extension for daemon.

ids1024 commented 8 years ago

Weston's implementation: https://cgit.freedesktop.org/wayland/weston/tree/xwayland/selection.c

alkino commented 8 years ago

Some thoughts on subject by Martin Graesslin. Developper of KDE Window Manager and KDE Plasma Compositor: https://blog.martin-graesslin.com/blog/2016/07/synchronizing-the-x11-and-wayland-clipboard/

He cheat with Qt to speak with X11 clipboard but need to implement link between both, and this is interesting to know. I think ;)