Paolo Amoroso amoroso@mclink.it writes:
Christophe Rhodes csr21@cam.ac.uk writes:
Oh, yes, CMUCL's clx doesn't have this useful feature. Please replace the call to OPEN-DEFAULT-DISPLAY with however you manage to open displays; maybe (open-display "localhost") or (open-display "your-host-name") or (open-display "").
I replaced it with (open-display "localhost") and run the test, i.e. started the program, left clicked in its window, and midlle-clicked in a Konsole. The pasted string is:
Hello, World (from the CLX clipboard)!
OK, so my clipboard demo succesfully pastes to console...
Just after starting the program, the output is:
- (clipboard:main)
PropertyNotify :_KDE_NET_WM_USER_CREATION_TIME :NEW-VALUE PropertyNotify :_NET_WM_DESKTOP :NEW-VALUE PropertyNotify :_KDE_NET_WM_FRAME_STRUT :NEW-VALUE PropertyNotify :_NET_WM_ALLOWED_ACTIONS :NEW-VALUE PropertyNotify :WM_STATE :NEW-VALUE PropertyNotify :_NET_WM_STATE :NEW-VALUE PropertyNotify :_NET_WM_ICON_GEOMETRY :NEW-VALUE PropertyNotify :_NET_WM_ICON_GEOMETRY :NEW-VALUE ButtonPress
When left clicking, an endless loop displaying messages like this starts:
set-selection-owner
SelectionRequest :PRIMARY :TIMESTAMP :KLIPPER
sending none
SelectionRequest :PRIMARY :TARGETS :_QT_SELECTION
sending targets list
SelectionRequest :PRIMARY :STRING :_QT_SELECTION
sending text data
SelectionRequest :PRIMARY :TIMESTAMP :KLIPPER
... but "KLIPPER", probably some bizarre KDE thing, is now getting in the way. OK, but in this test you're not getting any length-errors. Hmm.
So I might not be seeing the problems you're seeing because I'm not running a KDE environment; I'm simply testing in the terminals you're saying you see problems with. If there are desktop-specific clipboard daemons, there is quite reasonably MORE PAIN to be experienced.
I don't really know what to suggest; I'd probably ask the developers of whatever desktop environment you're using about known interoperability issues with clipboard handling, and see if they act shy and bashful. I claim that clipboard.lisp is ICCCM-compliant code, but I've been wrong before -- specifically, I've been wrong when I reported a bug in gdk about it, so it's possible there are bugs lurking. There is C code referenced from the lisp file which might be of assistance when talking to C-based developers; asking them why the C code produces an endless loop might prompt a response.
Cheers,
Christophe