xwinclip re selection polling

Jehan nahor@bravobrava.com
Thu Aug 29 11:52:00 GMT 2002


Chris Twiner wrote:
> I have attached a zip with the complete files in there, not just diffs 
> etc in case the base version is different now.  They xwinclip normal 
> files and the xwinclip_hook file additions have been changed to agree 
> with the sytle guidelines Harold pointed out.
> 
> kill_xwinclip.c and kill_xwclip_hook.c haven't but there isn't much to 
> them anyway, and I'd like to figure out a way to remove them anyway.
[...]
> Hope the format is ok. If not tell me and I'll send them back with 
> whatever changes are necessary. Cygwin is a great tool, I want to 
> contribute.

There is some obvious cleaning to do here. First, is to use only tabs or 
only spaces (don't remember which one Harold uses). Having a mix of 
space and tabs is a big mess for people who don't use the same tab size 
(8 vs 4 vs 3 vs 2).

Some files (windproc.c at least) has a huge number of spaces/tabs at 
then end of line (see KillXWinclip function ).

Some files don't have indentation at all (kill_xwinclip.c) or barely 
(kill_xclip_hook.c). As you said, there isn't much to them anyway so 
it's not a huge task to clean them but that will still help others who 
would want to look at the code. Also, even if you want to get rid of 
them, you don't know how long they will stay. There was once a guy who 
said that storing the date with only 2 digits was be good enough, that 
by the time we would get to 2000, the software would have been replaced 
and corrected... you know the end of the story ;)

I don't know how much of the problems are yours or from the original 
code (never looked at it) but it would be a good thing to have that 
cleaned in any case.


> Untested and definitely won't work is running more than one screen. The 
> hook relies on the Cygwin/XFree86 window title, it will therefor not 
> work with more than one screen.

What about trying to integrate xwinclip inside XWin? It would fix this 
problem since you don't have to create the Hook. You just have to add a 
call to the owner thingie in xwinwndproc.c file. It would also allow to 
get rid of the two files you want to remove ;). Last, it would reduce 
the size of the Cygwin/XFree to-do list (a killer feature for Harold ;)).

	Jehan





More information about the Cygwin-xfree mailing list