[Xquartz-dev] Xquartz-dev Digest, Vol 12, Issue 7

George Peter Staplin georgeps at xmission.com
Sun Oct 12 00:55:06 PDT 2008


Quoted Jeremy Huddleston <jeremyhu at apple.com>:

>>> Did you try using the menu rather than the keyboard shortcut?
>>
>> Yes, tried it both ways and was the same.
>
> Well I can't reproduce that at all...  I'll get you a binary with
> debug spew to try out (or maybe George can get it for you)
>
>>> I highly doubt that is deterministic.  There's no way to actually
>>> implement the behavior you described (unless it's due to a race
>>> condition)... and I just tested it out here and it works as expected.
>>
>> Well I just re-tested and I really am seeing this. Here's a more
>> expanded description of what I'm seeing with copy/paste, which I've
>> taken the time to capture in hope that it is helpful for developers.
>>
>> If I type text at the prompt in xterm, highlight it with the mouse,
>> then deselect it, then select OS-X menu Edit-> Copy (also tried
>> command-C) then try to paste in Textedit and nothing happens, but in
>> xterm I can still recall that previously highlighted text with button
>> 2, as expected for X11.
>> If I do the exact same thing, but select OS-X Edit-> Copy while the
>> text in xterm is still highlighted, it does copy to Textedit. I get
>> the same result with command-C as I do with Edit -> Copy.
>
> Hmm... actually, I was just testing with urxvt.  I see the behavior
> you describe when using xterm, and I can only surmise that it responds
> differently when it is unselected than when it's selected.  I'll leave
> this in George's court, but it's definitely specific to xterm (and I
> guess your eterm as well).

It's a feature of xterm.  I'm not sure why they have it work that way  
in xterm.  Thomas Dickey may know why.  The way it works is that when  
text is selected then PRIMARY is owned (unless you use the  
selectToClipboard resource), and when no text is selected the owner is  
set to None.  When you are actually pasting with button 2 it's pulling  
from the CUT_BUFFER0 when the PRIMARY isn't owned.

I don't understand enough about CUT_BUFFERS, and why there are 8 of  
them.  I think they aren't even in the ICCCM.  My understanding is  
that they are an old method of client selection communication, that  
only a few old apps use.

> urxvt works as expected.
>
>> Is there something wrong with my Eterm, or is this the
>> symptom of something going on system wide in X11?
>
> It's probably something specific to eterm and xterm.  We have issues
> with nedit too...

I'm not sure why eterm is behaving that way.  I will try to see why soon.

>> On the graphics side, I re-tested and have some details. I can copy
>> from Preview to Gimp, but not vise-versa. I tried every possible way I
>> could think of that might work. After opening and selecting an image
>> in Gimp, I tried just selecting an area and then using OS-X Copy;
>> tried selecting an area, using Edit -> Copy from within Gimp, then
>> using OS-X copy.  Tried all these with command-C in place of the OS-X
>> menu copy. None of these combinations would paste into Preview or
>> Photoshop from Gimp.
>>
>> I cannot copy from Adobe Photoshop Elements 6.0 to Gimp at all. This
>> is strange: When I copy an image in Photoshop, I can paste it into
>> Preview, but not X11 Gimp. When I copy an image in Preview, I can
>> paste it into both Photoshop and into X11 Gimp.

I think it will work, given the details that were provided in another  
message I responded to.  Just let the Gimp Edit->Copy menu do the act  
of copying the data, and then go Paste in your Mac Photoshop.  It  
should work just fine, though I don't have photoshop to test with, it  
works for me from the Gimp to Preview.


George
-- 
http://people.freedesktop.org/~gstaplin/


More information about the Xquartz-dev mailing list