New clipboard proposal

Philip Van Hoof spamfrommailing at freax.org
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
much):
 
http://cvs.freax.be/cgi-bin/viewcvs.cgi/clipman/

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
        libXfixes.so.3 => /usr/X11R6/lib/libXfixes.so.3 (0x00e24000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00551000)
        libc.so.6 => /lib/tls/libc.so.6 (0x003fa000)
        libdl.so.2 => /lib/libdl.so.2 (0x0054b000)
        /lib/ld-linux.so.2 (0x003e1000)
[freax at lort clipman]$ ldd plugins/ipc-dbus/.libs/libipcdbus.so
        libXfixes.so.3 => /usr/X11R6/lib/libXfixes.so.3 (0x00cd5000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00ed5000)
        libdbus-1.so.0 => /usr/lib/libdbus-1.so.0 (0x00519000)
        libc.so.6 => /lib/tls/libc.so.6 (0x007f4000)
        libdl.so.2 => /lib/libdl.so.2 (0x00200000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x002b1000)
        /lib/ld-linux.so.2 (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
http://www.freax.be, http://www.freax.eu.org




More information about the xdg mailing list