public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Spurious pastes
@ 2018-02-02 21:13 David Mathog
  2018-02-02 22:26 ` David Mathog
  0 siblings, 1 reply; 5+ messages in thread
From: David Mathog @ 2018-02-02 21:13 UTC (permalink / raw)
  To: cygwin-xfree

Greetings,

I do most of my work on remote CentOS machines from a Windows box using 
a putty ssh tunnel and Cygwin X Server (1.14.1-1).

In the last few days nedit on those remote machines has been doing 
spurious pastes. That is, whatever is currently in the X11 paste buffer 
(not the program's paste buffer) is ending up dropped into whatever file 
is being edited.  Unclear why they are landing where they do, I have not 
actually seen it happen, just found it when diff indicated these odd 
insertions.  My best guess is that these happen while I am scrolling 
over these regions.  Needless to say, this is really not a good thing.

There have been only two changes recently.

1.  I cleaned my mouse.
2.  yum on 1/27/18 automatically installed on those servers:
  xorg-x11-server-common-1.17.4-16.el6.centos.1.x86_64

To eliminate (1) the mouse was swapped with another one.  Too soon to 
know if that did anything.

Part, maybe the whole issue, seems to be a change in how the X11 paste 
buffer is working.

I seem to recall that before this if I highlighted a region in an xterm 
window, then moved to another X11 application window, and center 
clicked, it would paste the highlighted text.  However, if nothing was 
highlighted in the last window, nothing would paste.  My memory may be 
faulty on this issue though, as I never paid a lot of attention to it 
before it started misbehaving.

Now the paste buffer seems to remember forever the last thing that was 
loaded into it.  This is the X11 paste buffer, not the one in nedit.  
The latter can be cleared by clicking once in any document and doing 
copy.  However, that does not clear the X11 paste buffer, just the 
applications.

In order to minimize these spurious X11 window into nedit pastes I would 
like to be able to clear the X11 paste buffer.  How would one do so?  I 
mean, other than shutting down and restarting the X11 server!

Thanks,

David Mathog
mathog@caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Spurious pastes
  2018-02-02 21:13 Spurious pastes David Mathog
@ 2018-02-02 22:26 ` David Mathog
  2018-02-07 14:26   ` Jon Turney
  0 siblings, 1 reply; 5+ messages in thread
From: David Mathog @ 2018-02-02 22:26 UTC (permalink / raw)
  To: cygwin-xfree

On 02-Feb-2018 13:13, David Mathog wrote:
> I seem to recall that before this if I highlighted a region in an
> xterm window, then moved to another X11 application window, and center
> clicked, it would paste the highlighted text.  However, if nothing was
> highlighted in the last window, nothing would paste.  My memory may be
> faulty on this issue though, as I never paid a lot of attention to it
> before it started misbehaving.

That wasn't right, but cut/paste is slightly different between "on the 
console" and "over putty ssh tunnel with X11 Server on Windows".

On an XFCE4 ubuntu system console this is what happens:

1.  type "pwd<enter>" into an uxterm window
2.  highlight "pwd" on the line at the preceding prompt, center
     click once at the current prompt.  "pwd" is pasted.
     Press "enter".
3.  left click once on the still highlighted "pwd", now 2 lines up.
     The highlight goes away.  Center click once at the prompt.
     "pwd" is still pasted. Press "enter".
4.  With the left mouse button drag across any letter and back
     to the original position.  So nothing is highlighted.  This can
     be on any text anywhere in the window.  Center click
     at the prompt.  Nothing is pasted - the paste buffer is now
     empty.

So on the console it is possible to select "nothing".

On the X11 server ssh to the Ubuntu system and it is the same for the 
first 3 steps, but the 4th still pastes "pwd".  The rule seems to be 
"paste buffer can be replaced by anything selected, but not by a select 
operation which ends with nothing highlighted."

On the X11 server ssh to the Centos system, it behaves just like a 
similar connection to the Centos system.

The operations do the same thing when going between two uxterm windows 
on any of these tests.

Which is right?  Is "nothing" a valid thing to load into the paste 
buffer or no?

Is there a standard way to clear this buffer?

Thanks,

David Mathog
mathog@caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Spurious pastes
  2018-02-02 22:26 ` David Mathog
@ 2018-02-07 14:26   ` Jon Turney
  2018-02-07 17:37     ` David Mathog
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Turney @ 2018-02-07 14:26 UTC (permalink / raw)
  To: mathog, cygwin-xfree

On 02/02/2018 22:26, David Mathog wrote:
> In the last few days nedit on those remote machines has been doing 
> spurious pastes. That is, whatever is currently in the X11 paste 
> buffer (not the program's paste buffer) is ending up dropped into 
> whatever file is being edited. Unclear why they are landing where 
> they do, I have not actually seen it happen, just found it when diff 
> indicated these odd insertions. My best guess is that these happen 
> while I am scrolling over these regions. Needless to say, this is 
> really not a good thing.
> 
> There have been only two changes recently.
> 
> 1. I cleaned my mouse. 2. yum on 1/27/18 automatically installed on 
> those servers: xorg-x11-server-common-1.17.4-16.el6.centos.1.x86_64
> 
> To eliminate (1) the mouse was swapped with another one. Too soon to
>  know if that did anything.

I wonder if you aren't somehow accidentally clicking the middle mouse 
button whilst scrolling?

> On 02-Feb-2018 13:13, David Mathog wrote:
>> I seem to recall that before this if I highlighted a region in an
>> xterm window, then moved to another X11 application window, and center
>> clicked, it would paste the highlighted text.  However, if nothing was
>> highlighted in the last window, nothing would paste.  My memory may be
>> faulty on this issue though, as I never paid a lot of attention to it
>> before it started misbehaving.
> 
> That wasn't right, but cut/paste is slightly different between "on the 
> console" and "over putty ssh tunnel with X11 Server on Windows".
> 
> On an XFCE4 ubuntu system console this is what happens:

I'm guessing this means a non-X terminal?

> 1.  type "pwd<enter>" into an uxterm window
> 2.  highlight "pwd" on the line at the preceding prompt, center
>      click once at the current prompt.  "pwd" is pasted.
>      Press "enter".
> 3.  left click once on the still highlighted "pwd", now 2 lines up.
>      The highlight goes away.  Center click once at the prompt.
>      "pwd" is still pasted. Press "enter".
> 4.  With the left mouse button drag across any letter and back
>      to the original position.  So nothing is highlighted.  This can
>      be on any text anywhere in the window.  Center click
>      at the prompt.  Nothing is pasted - the paste buffer is now
>      empty.
> 
> So on the console it is possible to select "nothing".
> 
> On the X11 server ssh to the Ubuntu system and it is the same for the 
> first 3 steps, but the 4th still pastes "pwd".  The rule seems to be 
> "paste buffer can be replaced by anything selected, but not by a select 
> operation which ends with nothing highlighted."
> 
> On the X11 server ssh to the Centos system, it behaves just like a 
> similar connection to the Centos system.
> 
> The operations do the same thing when going between two uxterm windows 
> on any of these tests.
> 
> Which is right?  Is "nothing" a valid thing to load into the paste 
> buffer or no?

 From the testing I did on a couple of linux systems, making an empty 
selection in urxvt doesn't change the clipboard contents, so I don't 
think this is specifically a Cygwin X server problem.

I think it's up to the client (i.e. urxvt) how it interprets making an 
empty selection, which seems to be to not update the selection.

> Is there a standard way to clear this buffer?

I was going to suggest 'xsel -c' or 'xclip -i /dev/null', but that 
doesn't work (in this case) for obscure reasons to do with cut buffers...


For future issues, can I ask you to use the cygwin list, per [1]

[1] https://cygwin.com/ml/cygwin-xfree-announce/2015-03/msg00001.html


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Spurious pastes
  2018-02-07 14:26   ` Jon Turney
@ 2018-02-07 17:37     ` David Mathog
  2018-02-15 12:44       ` Jon Turney
  0 siblings, 1 reply; 5+ messages in thread
From: David Mathog @ 2018-02-07 17:37 UTC (permalink / raw)
  To: cygwin-xfree

On 07-Feb-2018 06:26, Jon Turney wrote:
> On 02/02/2018 22:26, David Mathog wrote:
>> In the last few days nedit on those remote machines has been doing 
>> spurious pastes. That is, whatever is currently in the X11 paste 
>> buffer (not the program's paste buffer) is ending up dropped into 
>> whatever file is being edited. Unclear why they are landing where they 
>> do, I have not actually seen it happen, just found it when diff 
>> indicated these odd insertions. My best guess is that these happen 
>> while I am scrolling over these regions. Needless to say, this is 
>> really not a good thing.
>> 
>> There have been only two changes recently.
>> 
>> 1. I cleaned my mouse. 2. yum on 1/27/18 automatically installed on 
>> those servers: xorg-x11-server-common-1.17.4-16.el6.centos.1.x86_64
>> 
>> To eliminate (1) the mouse was swapped with another one. Too soon to
>>  know if that did anything.
> 
> I wonder if you aren't somehow accidentally clicking the middle mouse
> button whilst scrolling?

That seems to be what caused it.  Those errant pastes have not happened 
again with the 2nd mouse.  My best guess is that somehow putting the 
mouse back together decreased the "click distance" on the scroll wheel, 
so that now and then in the middle of a scroll motion there was also a 
click.  I would never see it when it happened because the scroll actions 
on either side of the click would move it off the screen.

> 
>> On 02-Feb-2018 13:13, David Mathog wrote:
>>> I seem to recall that before this if I highlighted a region in an
>>> xterm window, then moved to another X11 application window, and 
>>> center
>>> clicked, it would paste the highlighted text.  However, if nothing 
>>> was
>>> highlighted in the last window, nothing would paste.  My memory may 
>>> be
>>> faulty on this issue though, as I never paid a lot of attention to it
>>> before it started misbehaving.
>> 
>> That wasn't right, but cut/paste is slightly different between "on the 
>> console" and "over putty ssh tunnel with X11 Server on Windows".
>> 
>> On an XFCE4 ubuntu system console this is what happens:
> 
> I'm guessing this means a non-X terminal?

That is a regular X11 server, xorg 1.15.1.  It just acts differently in 
that it was possible to "select nothing".

>> Is there a standard way to clear this buffer?
> 
> I was going to suggest 'xsel -c' or 'xclip -i /dev/null', but that
> doesn't work (in this case) for obscure reasons to do with cut
> buffers...

Too bad.  Sometimes I cut and paste hundreds of lines of text and those 
are always a mistaken center click in an xterm away from hundreds of 
bogus commands trying to run.

If you have any control of this issue a standard key stroke combination 
to clear would be wonderful.  Failing that, control-shift-center click 
(or something like that) to paste and then clear would be nearly as 
good.

> For future issues, can I ask you to use the cygwin list, per [1]
> 
> [1] https://cygwin.com/ml/cygwin-xfree-announce/2015-03/msg00001.html

I will try to remember that.

Thanks,

David Mathog
mathog@caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Spurious pastes
  2018-02-07 17:37     ` David Mathog
@ 2018-02-15 12:44       ` Jon Turney
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Turney @ 2018-02-15 12:44 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: mathog

>>> On 02-Feb-2018 13:13, David Mathog wrote:
>>>> I seem to recall that before this if I highlighted a region in an
>>>> xterm window, then moved to another X11 application window, and center
>>>> clicked, it would paste the highlighted text.  However, if nothing was
>>>> highlighted in the last window, nothing would paste.  My memory may be
>>>> faulty on this issue though, as I never paid a lot of attention to it
>>>> before it started misbehaving.
>>>
>>> That wasn't right, but cut/paste is slightly different between "on 
>>> the console" and "over putty ssh tunnel with X11 Server on Windows".
>>>
>>> On an XFCE4 ubuntu system console this is what happens:
>>
>> I'm guessing this means a non-X terminal?
> 
> That is a regular X11 server, xorg 1.15.1.  It just acts differently in 
> that it was possible to "select nothing".

Hmm... I'm not sure what to make of that.

In my brief testing, the behaviour does seem to vary with different 
terminals: terminator doesn't let you select an empty region, lxterm 
empties the selection (your expected behaviour), and xterm/rxvt don't 
change the selection.


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-15 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 21:13 Spurious pastes David Mathog
2018-02-02 22:26 ` David Mathog
2018-02-07 14:26   ` Jon Turney
2018-02-07 17:37     ` David Mathog
2018-02-15 12:44       ` Jon Turney

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).