Re: Problems with xwinclip version 0.5/0.6

2002-11-11 Thread Kercso Jozsef
Hi!

 o xwinclip-Test06:

 The first difference I see when using the latest version of xwinclip
 is the marked regions in X windows stay marked after releasing the
 left mouse button !!

I have installed the xwinclip-Test06, but the selection not only dissapears,
after I release the mouse button, but it flashes continously, and I can't
paste the selection either under X, nor in windows.
Has anybody any ideea, why is this so?

Thanks,
  Jozsef Kercso




Re: Problems with xwinclip version 0.5/0.6

2002-11-11 Thread Kercso Jozsef
Hi!

  In my previous mail I don't said, that I found this behaviour
of xwinclip only under Solaris using the CDE desktop.

Best Regards
  Jozsef Kercso




Re: Problems with xwinclip version 0.5/0.6

2002-11-11 Thread Chris Twiner
I have installed the xwinclip-Test06, but the selection not only 
dissapears,
after I release the mouse button, but it flashes continously, and I can't
paste the selection either under X, nor in windows.
Has anybody any ideea, why is this so?

The second problem may be related to the first, given the flashing 
continuously.  It seems like the application you are using remotely tries to 
capture the x primary selection as well.  This release of xwinclip claims 
the x selection as soon as a selection has been made.  The other application 
may be doing the same, hence the continuous flashing.

You can try using the version I uploaded to the list.  It needs to be 
compiled though, and if you have the latest version of cygwin it probably 
won't work.  I should be able to release a new version of the xwinclip to 
the mailing list tonight which should work with the latest version, I hope.

Regards,

Chris

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



Re: Problems with xwinclip version 0.5/0.6

2002-10-25 Thread Brian Gallew
Chris Twiner said:
 Thanks for the 'extern C', I had forgotten to add those.  If you
 don't  mind however I'll avoid poluting the std namespace.

By all means.  I'm just glad it works.





Re: Problems with xwinclip version 0.5/0.6

2002-10-24 Thread Brian Gallew
Chris Twiner said:
 Also I'm still a little confused as to why you needed to change the
 build  dll script anyway, what release of cygwin are you using?
 Maybe I and the  others have an older/newer version.

So, the fundamental problem is that gcc-3.2 does name mangling in a
different way than gcc-2.95.  In xwinclip.c you have code which
references SetHook__Fv and RemHook__Fv.  Under gcc-2.95, SetHook
gets mangled to _SetHook__Fv and so it is found properly.  Under
gcc-3.2, SetHook gets mangled to __Z7SetHookv, so it isn't found.

This is the fundamental problem with mixing C++ and C code together. 
I've attached a patch to take care of the problem.



--- xwinclip_hook.cpp.orig  2002-10-24 07:51:37.0 -0400
+++ xwinclip_hook.cpp   2002-10-24 08:05:50.0 -0400
 -125,6 +125,7 
 } 
 
 
+namespace std { extern C {
 
 __declspec(dllexport) int 
 SetHook () {
 -148,6 +149,7 
   UnhookWindowsHookEx(XWinclip_hook-hhHookHandle);
   return 1;
 }
+}}
 
 extern C int WINAPI 
 DllMain(HINSTANCE hinst, unsigned long reason, void*)
--- xwinclip.c.orig 2002-10-24 08:07:42.0 -0400
+++ xwinclip.c  2002-10-24 08:07:45.0 -0400
 -477,7 +477,7 
  }
   g_hinstanceActivateHookDLL=hinstanceActivateHookDLL;
   
-   pSetHookFunc = (HookFunction)GetProcAddress(hinstanceActivateHookDLL, 
SetHook__Fv); 
+   pSetHookFunc = (HookFunction)GetProcAddress(hinstanceActivateHookDLL, SetHook); 
   
   if (pSetHookFunc==NULL)
 {
 -486,7 +486,7 
   return 1;
 }
 
-   phcRemHookFunc = (HookFunction)GetProcAddress(hinstanceActivateHookDLL, 
RemHook__Fv); 
+   phcRemHookFunc = (HookFunction)GetProcAddress(hinstanceActivateHookDLL, 
+RemHook); 
   if (phcRemHookFunc==NULL)
 {
   printf(could not get rem hook func \n);



Re: Problems with xwinclip version 0.5/0.6

2002-10-24 Thread Chris Twiner
Hi Brian,

Thanks for the 'extern C', I had forgotten to add those.  If you don't 
mind however I'll avoid poluting the std namespace.

Chris

_
Choose an Internet access plan right for you -- try MSN! 
http://resourcecenter.msn.com/access/plans/default.asp



Re: Problems with xwinclip version 0.5/0.6

2002-10-23 Thread Chris Twiner
Hi,

I can send you them directly later (I'm at work now) but..

You say it dies after the messages are displayed, do you mean that xwinclip 
then terminates?  Or do you mean it doesn't seem to do much?

Also I'm still a little confused as to why you needed to change the build 
dll script anyway, what release of cygwin are you using?  Maybe I and the 
others have an older/newer version.

Chris


_
Get faster connections -- switch to MSN Internet Access! 
http://resourcecenter.msn.com/access/plans/default.asp



Re: Problems with xwinclip version 0.5/0.6

2002-10-22 Thread Dr. Volker Zell
 Chris == Chris Twiner [EMAIL PROTECTED] writes:

Chris Hi Volker,
Chris Can you try the version I posted last month (there were several
Chris versions but the last post holds the best version).

Okay I downloaded

o xwinclip-20020622-0007.tar.bz2 - 
http://www.msu.edu/~huntharo/xwin/xwinclip/xwinclip-20020622-0007.tar.bz2
and
o xwinclip_chris_twiner - 
http://sources.redhat.com/ml/cygwin-xfree/2002-09/msg00042/xwinclip_chris_twiner.zip 
attached to your message from # Sun, 08 Sep 2002 22:23:21 +

I then copied over your stuff to the xwinclip-20020622-0007 release and did a 

xmkmf
make
./build_dll.SH

The last step gave me:

Build the Dll

linking hook dll DllMain as entry point
Creating library file: libxwinclip_hook.import.a
xwinclip_hook.o(.eh_frame+0x11):xwinclip_hook.cpp: undefined reference to 
`__gxx_personality_v0'

So I added to the link line in the build_dll.SH script: -L/lib/mingw -lstdc++

---
#!/bin/bash

echo 
echo Build the Dll
echo 

gcc -c xwinclip_hook.cpp -o xwinclip_hook.o
echo linking hook dll DllMain as entry point
gcc -Wl,--out-implib,libxwinclip_hook.import.a -shared -e _DllMain@12 -mno-cygwin -o 
xwinclip_hook.dll xwinclip_hook.o -L/lib/mingw -lstdc++
---

Now I had xwinclip.exe and xwinclip_hook.dll. I tried with both rootless and 
nonrooless mode
but in both cases when starting up xwinclip I get:

UnicodeSupport - Windows NT/2000/XP
starting thread
message id is 36
message id is 129
message id is 131
the hwnd is 1179884
!!! Message for another window recieved, ioctl not being called before windows 
messages recieved is probable problem
could not get set hook func

Chris It solves the clearing of the selection.  I am suprised that the
Chris test06 solved your problem, it didn't with me or other users.  I use
Chris NEdit so I have the same issue with active regions.

Chris With respect to the selection maintaining two different clipboards can
Chris you tell me if it seems to behave the same with my changes?

See above

Chris Also if you're testing rootless mode it would be good to know if it
Chris works in that (it looks for a focus change in the root window so I am

See above

Chris not sure it will), I haven't had time to have a look yet.

Chris Regards,

Chris Chris

Ciao
  Volker




Re: Problems with xwinclip version 0.5/0.6

2002-10-22 Thread Chris Twiner
Hi Volker,

I notice you had a mingw error.  Could you please try using the gcc provided 
with cygwin, as I believe myself and others use.  It should remove most of 
the problems you're seeing as neither myself nor others seem to have them.

As to the output, that's correct it's debug information to let me know what 
is going on message wise through the system.  The ioctl statement is due to 
the cygwin code for the windows device explicitly mentioning setting the 
hwnd it listens to (or listens to all).  Which doesn't really hurt anything 
in the code you have.

After that message it should also display information in the xwinclip window 
about what windows and X messages are being processed involving the 
clipboards, again just debug information.

Thank you for trying to use the code though.

Chris

_
Unlimited Internet access for only $21.95/month.  Try MSN! 
http://resourcecenter.msn.com/access/plans/2monthsfree.asp



Re: Problems with xwinclip version 0.5/0.6

2002-10-22 Thread Dr. Volker Zell
 Chris == Chris Twiner [EMAIL PROTECTED] writes:

Chris Hi Volker,
Chris I notice you had a mingw error.  Could you please try using the gcc
Chris provided with cygwin, as I believe myself and others use.  It should
Chris remove most of the problems you're seeing as neither myself nor others
Chris seem to have them.

Actually I'm using the latest cygwin gcc-3.2-1.
Is it possible to send me your version of xwinclip privatly ?

Chris As to the output, that's correct it's debug information to let me know
Chris what is going on message wise through the system.  The ioctl statement
Chris is due to the cygwin code for the windows device explicitly mentioning
Chris setting the hwnd it listens to (or listens to all).  Which doesn't
Chris really hurt anything in the code you have.

Chris After that message it should also display information in the xwinclip
Chris window about what windows and X messages are being processed involving
Chris the clipboards, again just debug information.

My xwinclip dies after displaying this messages.

Chris Thank you for trying to use the code though.

Chris Chris

Ciao
  Volker




Problems with xwinclip version 0.5/0.6

2002-10-21 Thread Dr. Volker Zell
Hi

I have some problems with the different versions of xwinclip.

o xwinclip-Test05:

Marking and pasting works in both directions from Windows to X and
vice versa.
But when marking in an X window the marked area disapppears as 
soon as I release the left mouse button, but at least it's copied 
to the clipboard.

Now my problem: In the cygwin X-version of XEmacs 21.4 (patch 6) 
I do not get active regions anymore because of this feature. So
all the region commands do not work anymore rendering Xemacs almost
useless.

When killing xwinclip the active regions work again but of course now
I can only copy between X windows.

o xwinclip-Test06:

The first difference I see when using the latest version of xwinclip
is the marked regions in X windows stay marked after releasing the
left mouse button !!

So this fixes the xemacs active region behaviour.

But now xwinclip works only in one direction and it also depends
from where you start marking regions.

This is what I found:

When I start marking regions in a Windows window (Ww) I can paste it
in an X window (Xw).
But as soon as I mark a region in an Xw the clipboard contents
which gets pasted in the Ww is the last text I marked in the Ww.

It looks like from that point on there are now two independent clipboards
one for Windows and on for Xfree.

Any hints or at least can somebody confirm my findings ?

Ciao
  Volker
 
By the way the new rootless mode works great. I'm using the latest 4.2.0-15




Re: Problems with xwinclip version 0.5/0.6

2002-10-21 Thread Chris Twiner
Hi Volker,

Can you try the version I posted last month (there were several versions but 
the last post holds the best version).

It solves the clearing of the selection.  I am suprised that the test06 
solved your problem, it didn't with me or other users.  I use NEdit so I 
have the same issue with active regions.

With respect to the selection maintaining two different clipboards can you 
tell me if it seems to behave the same with my changes?

Also if you're testing rootless mode it would be good to know if it works in 
that (it looks for a focus change in the root window so I am not sure it 
will), I haven't had time to have a look yet.

Regards,

Chris




_
Surf the Web without missing calls! Get MSN Broadband. 
http://resourcecenter.msn.com/access/plans/freeactivation.asp