My problem is slightly different; I'm copying from a pygtk application to a 
legacy application using the clipboard.  With the code in the selection.py 
sample file, the middle button paste works but a paste from the taskbar (in 
gnome-terminal, for example) doesn't work.  Using xclipboard I got it to work 
using Edit/Paste, but the middle button paste doesn't work.  That is, I 
haven't managed to get *both* middle button and Edit/Paste to paste.  (In the 
cases where xclipboard is being used, Edit/Paste works but middle button 
doesn't.)

Obviously I'm missing something.  Is this related to selection names, such as 
GDK_SELECTION_PRIMARY (which I just copied under emacs, and pasted under 
kmail, and both middle button and edit/paste work, so it is possible).

On Monday 27 May 2002 08:57 pm, Christian Reis wrote:
> On Tue, May 28, 2002 at 09:47:08AM +0800, James Henstridge wrote:
> > X selection handling is an asynchronous operation.  When a user "copies"
> > some text to the clipboard, the text doesn't necessarily get copied
> > anywhere.  Instead, the application claims the CLIPBOARD selection. When
> > another app wants to paste the contents of the clipboard, they request
> > the contents of the CLIPBOARD selection in a particular format (eg. UTF8
> > text, html, an image, etc), which sends a message to the first app.  The
> > first app then sends the data back in the requested format.  This has
> > the benefit that no data is sent over the wire until it is requested,
> > and content type negotiation can be performed.
> >
> > As you can see, this model breaks down when the selection owner window
> > gets destroyed.  There are some tools to work around this problem such
> > as xclipboard.  The downside to xclipboard is that every time the
> > CLIPBOARD selection is claimed, the data gets requested by xclipboard,
> > and xclipboard will only store the data in one format.
>
> Added http://async.com.br/faq/pygtk/index.py?req=show&file=faq20.010.htp
>
> Take care,

-- 
Seth Kurtzberg
MIS Corp.
Office:  (480) 661-1849
Fax: (480) 614-8909
email:  [EMAIL PROTECTED]
pager:  888-605-9296 or email [EMAIL PROTECTED]
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to