Re: Is Cygwin X server causing ubuntu eclipse to copy to the clipboard on selection?

2012-06-25 Thread Jon TURNEY
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.

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.

As always, patches welcome :-)

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer


--
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/



Re: XWin 1.12.1.0 seg faults on startup?

2012-06-25 Thread Jon TURNEY
On 21/06/2012 04:39, Nick Vasilatos wrote:
 Well... the new server (i1.12.2.0) also seg faults at 0x0 on startup. Debugger
 says ``No Stack''? The log file is attached.

 [Inferior 1 (process 17136) exited with code 01]
 (gdb) bt full
 No stack.
 (gdb)

This says that the XWin process exited, so either gdb somehow failed to catch
it when it segfaulted.  Or did it not segfault at all?

 On 6/17/2012 10:09 AM, Jon TURNEY wrote:
 On 09/06/2012 17:32, Nick Vasilatos wrote:
 XWin doesn't want to start for me. This is a new install of Cygwin/new 
 install
 of Win7 on an AMD x64 system with an Nvidia gtx-570 GPU; I've reinstalled 
 the
 X components a couple of times; rebasedall a couple of times. The log (I
 installed an XWin.exe w/symbols) says:

 [ 5306.810] winPositionWindowMultiWindow: (x, y) = (0, 0)
 [ 5306.810] immediately return since hWnd is NULL
 [ 5306.810] winMapWindowMultiWindow - pWin: 80062268
 [ 5306.810] winUpdateWindowsWindow
 [ 5306.810] winReshape ()
 [ 5306.826] Segmentation fault at address 0x0

So, this looks like maybe it's failing while trying to create a window, so
this might be a timing condition at startup.

You might try creating an empty ~/.startxwinrc (so the default xterm is not
started by startxwin) and see if that makes a difference?

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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/



Re: no display specified

2012-06-25 Thread Jon TURNEY
On 17/05/2012 21:14, Chillosaurus wrote:
  some more data ?
 Is the remote machine a Unix one ? If so the you can look at
 http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-ssh-no-x11forwarding
 Yes it is a Unix cluster. A2 worked, but Matlab is approx. 60 times slower
 than normal - or even worse.
 Can this be solved?

If the slowdown is in drawing, it might be due to the fact you are not getting
hardware accelerated OpenGL.  To get this with the Cygwin X server currently
(1) You must be using multiwindow mode, and (2) you must 'export
LIBGL_ALWAYS_INDIRECT=1' on the remote machine.  See [1].

[1] http://x.cygwin.com/docs/ug/using-aiglx.html

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer



--
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/



Re: Is Cygwin X server causing ubuntu eclipse to copy to the clipboard on selection?

2012-06-25 Thread David Karr
On Mon, Jun 25, 2012 at 6:22 AM, Jon TURNEY jon.tur...@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/