On 2006-02-17, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> This has nothing to do with KDE specifically, that's just how X clipboard
>> handling works. The selection isn't copied/transmitted from the source
>> before the destination requests it.
>
> I just learned something, I think.  If that's true, that sucks!
>
> That said, I just opened a terminal (I'm using mrxvt now..), highlighted 
> something, closed the window, opened a new one, and pasted it, and it pasted 
> what I highlighted.  Is this true?  I'm not running klipper at the moment, 
> btw.

X has two clipboard mechanisms: cutbuffers and selections. Cutbuffers are
the old method, and with them the data is stored in X root window properties
(CUT_BUFFER0 etc.). Cutbuffers should only be used for strings, not
arbitrary data AFAIK. Indeed, the obvious problem with cutbuffers for
storing images and other data bigger than a short string, is that the X
server has to provide storage resources.

Selections fix this problem by only indicating the client holding the data
corresponding to the "selection" with a root window property. The clients
that want that data must then request it from the client holding the
selection -- even in a format of their choice, supposing the other end
supports it. The problem with this approach is, as should be evident, that
the selections get lost when the program holding it quits. *However*, this
approach transparently supports a clipboard daemon like klipper without
needing to assume one.

-- 
Tuomo

Reply via email to