xwinclip test 6 hacked to leave selection untouched

Chris Twiner c_twiner@hotmail.com
Mon Nov 18 07:50:00 GMT 2002


Hi Harold,

>
>From what I understand, you are grabbing ownership of the selection when 
>Cygwin/XFree86 loses focus... that is not the correct solution,

Nope, it only grabs X selection when both the windows clipboard has changed 
(in latest code) and any "cygwin/xfree86" class window is activated.  I.e. 
it won't grab it if a user moves from one "cygwin/xfree86" to another.

When the "cygwin/xfree86" looses focus it first looks for XA_PRIMARY and 
then XA_SECONDARY and then clipboard, not that the clipboard code works with 
motif apps.

The basic one window code (no clipboard chain) was there two months ago and 
posted to the group.  I.e. it fixed what was broken in test6 and fixed again 
by the recent poster.

>as other X Server on Windows implementations out there (not to name any 
>names) are able to watch the X selection without taking ownership of it 
>ever.

Which was the whole point of my fixes, you yourself claimed you could not 
see what was wrong with test6 "prove to me with code" was your response.  So 
I did, you said "great" it looks like it works, thanks for the contributions 
I'll put it into a new test release, however you were busy and it would take 
a while. Which from the level of involvement you have with cygwin was all 
too reasonable.

>It sounds likes we need to watch the selection on the root window, rather 
>than stealing it for our own. If you did this, then I misunderstood what 
>you were trying to say. However, I doubt that you did this because grabbing 
>ownership of the selection when we lose focus would be unnecessary.

Indeed I did.  It never grabbed the selection when the focus was lost, only 
when the window was activated again. i.e. you have gone into windows and the 
clipboard is different so grab the windows clipboard.  The current version 
only does this when the clipboard has changed (And across -screen's).

I had tried to explain this before (as had other posters) but you didn't see 
anything was wrong, so I made it work in a consistent fashion with windows 
and most x servers and so it wouldn't break nedit (main motivation).

>I wait until a solution looks clean before I do anything with it, and 
>stealing ownership on losing focus didn't look like much of a solution.

Again it was only on gaining of activation, and you didn't at the time see 
anything was wrong with the test6 code.

You had wanted it external when you mentioned this (or internal with a 
disabling switch).  My solution was designed from the outset not to intefere 
with the inner workings of the xserver and to be within the X selection 
system, something that commercial solutions obviously aren't limited by.

Chris

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail



More information about the Cygwin-xfree mailing list