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

George Peter Staplin georgeps at xmission.com
Thu Sep 11 16:18:58 PDT 2008


Quoted Jeremy Huddleston <jeremyhu at apple.com>:

> Ok, my original response was over iPhone, so I couldn't really
> elaborate too much...  here's the basic logic/pseudocode for how this
> should work:
>
> Event PRIMARY changed (ie someone selected new text):
> 	if option_proxy_on_select:
> 		PRIMARY -> PB
>
> Event X11.app Edit->Copy menu item:
> 	PRIMARY -> PB
>
> Event CLIPBOARD changed:
> 	if option_proxy_CLIPBOARD:
> 		CLIPBOARD -> PB
>
> Event PB updated:
> 	if option_proxy_pb_to_clipboard:
> 		PB -> CLIPBOARD (this involves "grabbing" the CLIPBOARD)
> 	if option_proxy_pb_to_primary:
> 		PB -> PRIMARY (essentially same as above)
>
> Event server asks for PRIMARY/CLIPBOARD:
> 	get what's in PB and return

This won't work correctly in some cases from what I see.  The  
CLIPBOARD and PRIMARY selections are just owned.  And once owned it  
seems not all X11 apps will set ownership again (e.g. Tk and possibly  
others).  They don't technically have to.  So we have the same  
ambiguous situation as before.


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


More information about the Xquartz-dev mailing list