[Xquartz-dev] Proposal for PRIMARY and CLIPBOARD Copy/Paste
George Peter Staplin
georgeps at xmission.com
Tue Sep 9 13:24:53 PDT 2008
Hi,
I've been working on pbproxy, and examining other X11 selection code.
It seems to me that we need the following menus and corresponding
messages that the AppleWM could provide to a pbproxy-like app:
Copy Primary
Copy Clipboard
Paste Primary
Paste Clipboard
The reasons are as follows for the Copy menu items:
The existing Copy isn't precise enough. The user may have text
selected in an xterm that uses the PRIMARY selection, and an image or
text copied in the Gimp or another Gtk+ app that uses CLIPBOARD.
This means that it's unclear which selection to Copy to the
NSPasteboard/pbs. If we copy PRIMARY then it may not be what the user
wants. If we copy CLIPBOARD that may not be what the user wants either.
The reasons for the Paste menu items are as follows:
When calling XSetSelectionOwner to set the X11 selection, it's also
imprecise to set ownership of the PRIMARY and CLIPBOARD. The user may
wonder why the previously selected PRIMARY xterm text selection is no
longer usable.
I wish the situation could be handled in a simpler manner, but X11
complicates this for us. The existing way is ambiguous.
I'm hoping to be able to have the pbproxy code working with these new
messages from the AppleWM soon.
I wrote an Xlib-based prototype that I showed to Jeremy that supports
the INCR protocol, so users will be able to paste large amounts of
text properly from toolkits that use the INCR protocol (such as Tk and
Xt/Xaw/Motif). The prototype also supports images, so it should
eventually be possible to copy and paste images from/to X11.
Any thoughts or opinions on this?
George
--
http://www.xmission.com/~georgeps/ http://whim.linuxsys.net
http://code.google.com/p/megapkg/
More information about the Xquartz-dev
mailing list