[Xquartz-dev] Making it less ambiguous - Copy/Paste Problem
George Peter Staplin
georgeps at xmission.com
Thu Sep 11 16:07:09 PDT 2008
Hi,
This code I just wrote demonstrates part of the idea:
http://www.xmission.com/~georgeps/xfixes_clipboard.c
We can use something like that to determine which window most recently
set ownership of the selection, and what selection was involved.
However there is still an unfortunate ambiguity still. The X11 Tk
text widget doesn't set the PRIMARY or CLIPBOARD again if it already
has acquired it.
Gtk+ apps always request ownership again, even if they already own it.
The ambiguity is this:
1. select some text to own PRIMARY in an X11 Tk text widget.
2. do an Edit->Copy to get a Gimp image into the CLIPBOARD.
3. select some text in a Tk text widget that already owned PRIMARY.
Nothing happens, so the code will think the last selection was from
the Gimp.
Unfortunately we can't copy images from most Gtk+ apps unless we
support CLIPBOARD, and if this ambiguous situation continues to
persist, there is little hope for the default Copy/Paste menus to work
properly in all cases.
I hope this is clear.
George
--
http://www.xmission.com/~georgeps/ http://whim.linuxsys.net
http://code.google.com/p/megapkg/
More information about the Xquartz-dev
mailing list