VNC Server code for 4.0 and CGPostEvent

Guys,
Im a old VNC user and had been using the 3.0 code from Subversion as reference for my own application I use to monitor/control my research computers. However with Lion the CGPostMouseEvent no longer works. I’ve tried CGEventPost but it causes weird behaviour on mouse-drag (the whole app stops).

Is it posible for you to share just that part of the code so I can see what I might be doing wrong? Thanks

Everything we are doing in Vine Server is stored in the CVS (not SVN) repository on SourceForge.net

The specific part you want is in the kbdptr.c file, but hasn’t changed recently:

            CGPostMouseEvent(cl->clientCursorLocation, TRUE, 3,
                             (buttonMask & rfbButton1Mask) ? TRUE : FALSE,
                             (buttonMask & rfbButton3Mask) ? TRUE : FALSE,
                             (buttonMask & rfbButton2Mask) ? TRUE : FALSE);

I hope that helps. Please note that our Vine Server 4.0 is still in Beta and has some bugs, although not the ones you are describing specifically.