Re: XForms: X Selections & xforms

Dr. T.C. Zhao (
Sun, 17 Aug 1997 13:18:34 -0500

To subscribers of the xforms list from "Dr. T.C. Zhao" <> :

from "Robert S. Mallozzi" <> :

> You will see that xforms does not copy data to CLIPBOARD, but
>rather to XA_PRIMARY.

To me, a clipboard is or can be viewed as something that different
applications use to transfer data, not something that is
named CLIPBOARD no one uses. No practical applications (xterm and its
derivatives, which pretty is the entire CLI of X,
netscape and you name it) actually uses CLIPBOARD. So anything written
specically for CLIPBOARD actually will not be able to exchange
data with other applicaitons.

If you're only interested in exchange data from one part of your program
to other parts, which your code appears to do (not handling
the possibility of some other application wants the CLIPBOARD)
I am not sure if selection is the most efficeint thing to to use.

>In clipboard.c, you make the call
> XSetSelectionOwner(fl_display, XA_PRIMARY, win, CurrentTime);
> because of race conditions that can otherwise occur."

You're absolutely correct. Actual server time instead of
CurrentTime should be used. This is the reason for the comment
in the clipboard.c header that fl_clipboard violates the ICCCM.
This will be fixed (the risk of a race condition is practically
zero however).

>Also, I noticed that in the fl_stuff_clipboard call(), one is *required* to
>provide an FL_LOSE_SELECTION_CB callback, even if there is nothing to be done

I can relax this so a null functin ptr can be used.

Thanks for the code. I will try accomadate other selection
atoms in the next release.

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: