New clipboard proposal

Philip Van Hoof spamfrommailing at
Tue Jan 4 18:46:04 EET 2005

On Thu, 2004-12-30 at 20:21 +0100, Philip Van Hoof wrote:

To get a basic idea of what I have so far (and yes, I know it isn't

It isn't yet a library nor anything really useful yet. It's just using
xfixes to catch every clipboard event (nothing special) and loading DBUS
from a plugin (also nothing special).

To show that it's possible that you don't have to depend on DBUS for the
core application, and to show that it's perfectly possible to make the
IPC a per-platform choice:

The first one isn't using DBUS. The second one (a library which is to be
dlopen'ed by the first one) is using DBUS indeed.

[freax at lort clipman]$ ldd src/clipman => /usr/X11R6/lib/ (0x00e24000) => /usr/X11R6/lib/ (0x00551000) => /lib/tls/ (0x003fa000) => /lib/ (0x0054b000)
        /lib/ (0x003e1000)
[freax at lort clipman]$ ldd plugins/ipc-dbus/.libs/ => /usr/X11R6/lib/ (0x00cd5000) => /usr/X11R6/lib/ (0x00ed5000) => /usr/lib/ (0x00519000) => /lib/tls/ (0x007f4000) => /lib/ (0x00200000) => /lib/ (0x002b1000)
        /lib/ (0x003e1000)
[freax at lort clipman]$

I am also playing with the idea of adding hooks to the xlib functions
related to copy and pasting. Maybe it's even possible to do all this in
xlib (or the newer xcb/xcl) and by that not breaking any backwards
compatibility. Even make it possible to let the old xclients use a new
technique without any changes necessary except of course relinking.

Puttings those hooks there also doesn't necessarily mean depending on
the code of those hooks (like DBUS code). This can also be implemented
as a library of which the functions, if the library is found and the
functions are implemented, are invoked. Basically just like what I'm
doing with [see above and checkout it's source]: Using some
functionpointers and checking for an implementation (easy stuff).

> Hi there fellow hackers, programmers and other people involved in the
> development of the freedesktop.
> There's been many problems with the current implementation of the X11
> clipboard. Before I start with my new proposal I'll guide you through
> the current implementation so you'll understand some terminology. If you
> already know everything about the clipboard on X11, you can skip all
> this, of course.

Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com,

More information about the xdg mailing list