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

George Peter Staplin georgeps at xmission.com
Fri Sep 12 12:27:33 PDT 2008


Quoted Jeremy Huddleston <jeremyhu at berkeley.edu>:

>
> On Sep 12, 2008, at 10:37, George Peter Staplin wrote:
>
>> Quoted Jeremy Huddleston <jeremyhu at berkeley.edu>:
>>
>>> We want to avoid "when switching fg/bg" because this causes  unexpected
>>> bahavior when using pbcopy/pbpaste (the expected behavior would be
>>> that pbpaste should paste whatever was just copied via cmd-c)
>>
>> How about one new menu item?  That's all we need to solve this I  think.
>>
>> Copy            (always copies PRIMARY to PB)
>
> yes
>
>> Copy Clipboard  (always copies CLIPBOARD to PB)
>
> No, we can do this automatically using the greedy-CLIPBOARD-ownership
> approach.
>
>> Paste           (makes pbproxy own PRIMARY and CLIPBOARD)
>
> Eh.  No.  That doesn't exactly "paste" now, does it?  pbproxy should
> automatically own CLIPBOARD and PRIMARY when the PASTEBOARD changes
> (assuming the user has enabled the options to do so).
>
>> This isn't much different than apps that provide 2 Paste modes (Paste,
>> and Paste and Reformat (IIRC)) in the menus as far as I see.
>
> Except that those applications actually "paste" the data.  Claiming
> ownership of CLIPBOARD and PRIMARY doesn't actually cause data to
> paste.  It is confusing and ambiguous (when it claims ownership, what
> is actually going to be sent when it is queried?  The PB data?  I'd
> much rather this be automatically done.
>
>> I understand it may be a lot of work to add 1 menu item, because of
>> localization, but I think it's the best way.
>
> Changing menus and localization is not a concern you need to worry  about.
>
>> I personally think it would be more awkward for users to have to
>> toggle the option repeatedly to Copy the proper data.  To me this
>> violates (my own) HIG more than 1 new menu item.
>
> What do you mean toggle the option repeatedly to copy the proper  data?
>  That was never suggested.  When the user does Edit->Copy in the
> Gimp/Nedit/OpenOffice menu, then that triggers CLIPBOARD to be sent to
> PASTEBOARD.  When they do X11.app's Edit->Copy, that sends PRIMARY to
> the PASTEBOARD.  There is no option to toggle X11.app's Edit->Copy to
> do anything other than PRIMARY.

That won't work well.  What do we do with CLIPBOARD when the owner has  
changed?

As I have said before, that breaks X11/Tk apps, and probably others.   
The selection owner is not required to send another XSetSelectionOwner  
request everytime the CLIPBOARD data changes.  So the data may be out  
of sync with reality.  The fact is that the data may only be generated  
on a paste/XConvertSelection request for normal X11 apps.  For what  
we're doing that would be done by the "Copy Clipboard" menu item which  
causes pbproxy to call XConvertSelection.


George
-- 
http://www.xmission.com/~georgeps/  http://whim.linuxsys.net
http://code.google.com/p/megapkg/


More information about the Xquartz-dev mailing list