Xwinclip doesn't work with Konsole

Harold L Hunt II huntharo@msu.edu
Fri Nov 22 01:06:00 GMT 2002


Jozsef,

I think I see the problem.  The code that handles converting the text 
format (added by Kensuke Matsuzaki) *always* looks at the PRIMARY 
selection, whereas I have just done some testing that seems to indicate 
that Konsole is using the CLIPBOARD selection.  Therefore, the converted 
text is blank.  I am not sure why this was hard coded... it seems to be 
an accident.  The code should be trying to convert the atom specified by 
  event.xselection.selection instead.

Download this version of xwinclip and let me know if it works:
http://www.msu.edu/~huntharo/xwin/xwinclip/xwinclip-20021121-1800.exe.bz2 
(5 KiB)

The faster you respond, the more likely I am to finish up this patch, 
and the happier I will be.


On a side note... I seem to have done something strange to this version 
of xwinclip.  I have been playing around with various patches to try and 
stop from having to grab ownership of the selection and, well, I seem to 
have stumbled on an improvement, though I cannot explain it and I fear 
that it might turn out not to be an improvement.  The behavior is as such:

1) Go into emacs under X, select some text.  The text remains selected.

2) Go into Notepad, paste the text.  The expected text is pasted.

3) Go back into emacs under X, select some new text.  Again, the text 
remains selected.

4) Go back into Notepad, paste the text.  Again, the expected text is 
pasted.  The behavior of xwinclip has been such that second selections 
would not work if the PRIMARY selection was not re-owned.  I seem to 
have done something that is stopping the PRIMARY selection from being 
reowned while still allowing notification of selection updates.  I 
checked my code and I am not watching XA_CUT_BUFFER0, so I have no idea 
what is going on.

5) Konsole still unselects the selected text immediately.

6) Strange.

I am still calling XSetSelectionOwner on event.xselection.selection... 
so I should be re-owning the PRIMARY or CLIPBOARD selection... maybe I 
will just leave this alone so that I can enjoy my delusion of having 
fixed the main problem with xwinclip.

Anyway, someone tell me if it works for them, please, please, please.


Harold

Kercso Jozsef wrote:
> Hi!
> 
>  > Can you give me the output of my xwinclip when you run these tests?
> Here it is:
> $ ./xwinclip.exe
> UnicodeSupport - Windows NT/2000/XP
> [[Prev mail Point 1. Second section("paste in Konsole works")]]
> FlushXEvents - CreateNotify parent: 54  window: 16777870
> FlushXEvents - CreateNotify parent: 54  window: 23069034
> [[Prev mail Point 2. Nothing happens!!]]
> [[Prev mail Point 3.]]
> SelectionNotify UTF8
> [[Prev mail Point 4. Nothing happens.]]
> $
> 
>  > I will post the built exe and the dll for my version as well, just to
>  > remove compilation issues.
> Great!
> 
> Best Regards
>   Jozsef Kercso
> 



More information about the Cygwin-xfree mailing list