From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25430 invoked by alias); 25 Jun 2012 15:54:09 -0000 Received: (qmail 25416 invoked by uid 22791); 25 Jun 2012 15:54:07 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-yx0-f171.google.com (HELO mail-yx0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jun 2012 15:53:53 +0000 Received: by yenq11 with SMTP id q11so3052726yen.2 for ; Mon, 25 Jun 2012 08:53:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.7.72 with SMTP id h8mr12719848oea.33.1340639633121; Mon, 25 Jun 2012 08:53:53 -0700 (PDT) Received: by 10.182.77.197 with HTTP; Mon, 25 Jun 2012 08:53:53 -0700 (PDT) In-Reply-To: <4FE8661E.9090809@dronecode.org.uk> References: <4FE8661E.9090809@dronecode.org.uk> Date: Mon, 25 Jun 2012 15:54:00 -0000 Message-ID: Subject: Re: Is Cygwin X server causing ubuntu eclipse to copy to the clipboard on selection? From: David Karr To: cygwin-xfree Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com X-SW-Source: 2012-06/txt/msg00033.txt.bz2 On Mon, Jun 25, 2012 at 6:22 AM, Jon TURNEY w= rote: > On 23/06/2012 00:33, David Karr wrote: >> I run Eclipse on win7, and also Eclipse on Ubuntu, displaying the >> window on my Win7 box, using Cygwin. >> >> One annoyance I have with the latter is that when I select a region of >> text, it appears to automatically copy that region to the clipboard, >> instead of waiting for me to press Ctrl-C. >> >> I asked about this on the eclipse forums, and they said Ubuntu Eclipse >> doesn't do this, and it's likely being done by my X server. > > Yes, the X server is copying the selected text to the Windows clipboard. > > Let me try to explain why: > > X supports an arbitrary number of 'selections', the two of interest here = are > the PRIMARY selection (which conventionally contains some data which the = user > has selected) and the CLIPBOARD selection (which conventionally contains = some > data that the user has explicitly requested to be 'copied' to the clipboa= rd) > > The Cygwin X server monitors these selections for changes, and makes text= in > the most recently changed one available for pasting from the Windows clip= board. It seems like you've just explained to me by using the word "conventionally" that the behavior of the Cygwin X server doesn't behave "conventionally". > So, if you select some text in eclipse after copying some text to the > clipboard, you will get the selected text, not the copied text, when you = paste > in Windows. > > I can understand this behaviour is confusing to people who are expecting = the X > clipboard to behave like the Windows one. > > It has been suggested a few times that we should not monitor the PRIMARY > selection, but some very popular X applications (such as xterm and emacs)= only > use the PRIMARY selection by default. =A0It's also been suggested that > monitoring the PRIMARY selection should be configurable somehow, but I'm = not > sure that a global configuration option would lead to very useful behavio= ur. I just verified that I can easily configure Emacs to not copy to the clipboard on selection, and to replace the selection on yank. It's unfortunate that I can't directly configure Eclipse to do this, but I would be surprised if they would have thought to implement this, as Eclipse normally works "the way you expect" on both Ubuntu and Windows. It's only when displaying the Ubuntu window on Windows through Cygwin that it behaves "unconventionally". -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/