[comp.windows.x] Curious Selection question

jcarson@moniz.bcm.tmc.edu (Janet Carson) (10/19/89)

I noticed something interesting the other day, and I was wondering if 
someone out there could explain how this works:

Start up 2 xterms.  Run a command in the first xterm and highlight
something.  Exit the first xterm.  Go into the second xterm and 
hit the second mouse button.  The selected area from the first xterm
is pasted in.

From what I understand about selections, the selection owner has to
be around to convert the selection, so how does the second xterm get
the selection after the owner has exited?


Janet L. Carson                               internet: jcarson@bcm.tmc.edu 
Baylor College of Medicine              uucp: {rutgers,mailrus}!bcm!jcarson

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (10/19/89)

> Start up 2 xterms.  Run a command in the first xterm and highlight
> something.  Exit the first xterm.  Go into the second xterm and 
> hit the second mouse button.  The selected area from the first xterm
> is pasted in.

> >From what I understand about selections, the selection owner has to
> be around to convert the selection, so how does the second xterm get
> the selection after the owner has exited?

Xterm puts its selected data in both the Primary selection and CUT_BUFFER0. 
This is done for compatability with old programs that don't know about
selections.   You are probabally getting the pasted data from CUT_BUFFER0.
If you want to be sure, used "xprop" on your root window.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213