[Xquartz-dev] Proposal for PRIMARY and CLIPBOARD Copy/Paste

Jeremy Huddleston jeremyhu at apple.com
Fri Sep 12 12:59:08 PDT 2008


On Sep 12, 2008, at 12:42, George Peter Staplin wrote:

> Quoted "Mark J. Reed" <markjreed at gmail.com>:
>
>> As an end user, I don't want to know or care about pasteboard vs.
>> primary X selections.  I want Edit->Copy to copy and Edit->Paste to
>> paste, whether I'm in X11 or not.  Adding another menu item just
>> confuses me, and I'm never going to be sure which one to use.  HIG or
>> no HIG, that's a bad design.
>
> Well then, your pasteboard will be out of sync with reality.
>
> You could type text into an X11 widget and copy it to the clipboard
> with Edit->Copy.  With the design that Jeremy is proposing it gets the
> data and transfers it to the pasteboard as I understand it.

Ok, I'm guessing you mean Edit->Copy in the X11 application (like  
OpenOffice) rather than the X11.app menu item.  We need a better way  
to disambiguate this in our conversations.

> Now, let's imagine you keep typing text and do another Edit->Copy.
> The text has changed, but the owner has not.  The application didn't
> get a SelectionClear message so as far as it's concerned it shouldn't
> have to call XSetSelectionOwner again.

Right, but using the greedy-CLIPBOARD scheme, the owner has changed  
(to pbproxy), so when he does the Edit->Copy (OpenOffice menu item),  
it claims the CLIPBOARD and then pbproxy copies the data and claims it  
back.

> So now you do another XQuartz Edit->Copy, and now the text you paste
> is only the first (old) text still.  It doesn't make much sense, does
> it?  The user will be confused, and wonder what happened to the new
> text.

Huh?  Why is that? In what scheme are you talking about?  That doesn't  
seem to be the way it should work based on the scheme I proposed.

> I don't think it's reasonable to patch every toolkit to call
> XSetSelectionOwner everytime the PRIMARY or CLIPBOARD selection  
> changes.

I agree with you.  It's not neccessary to do so.  If we make pbproxy  
greedy for the CLIPBOARD, then apps will be forced to reclaim  
ownership.  And as for PRIMARY, we don't care about that becasue Edit- 
 >Copy (X11.app menu item) triggers the proxy event for us, so we  
don't need to know when it's changed (except for the disabled-by- 
default-don't-expect-it-to-work option for power users... and they can  
just deal with the fact that it won't work all the time because of  
this issue).

--Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3221 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/xquartz-dev/attachments/20080912/a9ecf44c/attachment-0001.bin 


More information about the Xquartz-dev mailing list