public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: David Karr <davidmichaelkarr@gmail.com>
To: cygwin-xfree <cygwin-xfree@cygwin.com>
Subject: Re: Is Cygwin X server causing ubuntu eclipse to copy to the clipboard on selection?
Date: Mon, 25 Jun 2012 15:54:00 -0000	[thread overview]
Message-ID: <CAA5t8VrnR7renRRHKAD+ERHMHAF_2jCnfwJboRYnO8ZMGm1-oQ@mail.gmail.com> (raw)
In-Reply-To: <4FE8661E.9090809@dronecode.org.uk>

On Mon, Jun 25, 2012 at 6:22 AM, Jon TURNEY <jon.turney@dronecode.org.uk> wrote:
> 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 clipboard)
>
> The Cygwin X server monitors these selections for changes, and makes text in
> the most recently changed one available for pasting from the Windows clipboard.

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.  It'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 behaviour.

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/


  reply	other threads:[~2012-06-25 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 23:33 David Karr
2012-06-25 13:22 ` Jon TURNEY
2012-06-25 15:54   ` David Karr [this message]
2012-06-28 14:49     ` Jon TURNEY
2012-06-28 16:10       ` David Karr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA5t8VrnR7renRRHKAD+ERHMHAF_2jCnfwJboRYnO8ZMGm1-oQ@mail.gmail.com \
    --to=davidmichaelkarr@gmail.com \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).