This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Small clipboard bug triggered by gvim
- From: Alexander Gottwald <alexander dot gottwald at s1999 dot tu-chemnitz dot de>
- To: cygwin-xfree at cygwin dot com
- Date: Tue, 29 Mar 2005 13:06:35 +0200 (MEST)
- Subject: Re: Small clipboard bug triggered by gvim
- References: <4248933E.2030301@mscha.org>
- Reply-to: cygwin-xfree at cygwin dot com
On Tue, 29 Mar 2005, Michael Schaap wrote:
> Hi,
>
> I recently started using Cygwin/X a bit more, and it works amazingly well!
>
> I did, however, stumble upon a small bug using the built-in "-clipboard"
> handling: when using a GTK2 gvim, consecutive selections are not copied
> to the Windows clipboard.
>
> Here's how to recreate this:
>
> Build a GTK2 version of gvim. (Alternatively, just use a GTK2 gvim on a
> Linux box, for instance.)
> Start Cygwin/X, using
> run XWin -multiwindow -clipboard -silent-dup-error
> (e.g. using the standard batch file).
> Start an xterm.
> Start Notepad (or some other native Win app).
> Start gvim. Type
> Hello, World!
> Select the string "Hello" in gvim.
> Middle-click in xterm. Result: "Hello".
> Paste in Notepad. Result: "Hello".
> Select the string "World" in gvim.
> Middle-click in xterm. Result: "World".
> Paste in Notepad. Result: "Hello". Oops...
> Select something in Notepad and copy it to the clipboard.
> Re-select the string "World" in gvim.
> Paste in Notepad. Result: "World". Now it does work...
This is most likely because gvim always holds the selection.
There is no clipboard in X11, just an information which application
holds the selection. If an application wants to insert the selection
it sends an event to the selection owner and the owner sends back
the selected data. This may change between calls.
The clipboard manager does not receive information that the clipboard
changed, so it will insert the old string regardless of changes in the
client.
bye
ago
--
Alexander.Gottwald@s1999.tu-chemnitz.de
http://www.gotti.org ICQ: 126018723