diff options
author | runge <runge> | 2006-11-13 15:33:00 +0000 |
---|---|---|
committer | runge <runge> | 2006-11-13 15:33:00 +0000 |
commit | 4a83f87609b9d53b2983806be58ccd02498a5cd3 (patch) | |
tree | a79c96930a97fb162edd1765adece43425f8db8a /x11vnc/connections.c | |
parent | 5f9693d4a2c511f8f2ea069373807c5f36ac1459 (diff) | |
download | libvncserver-4a83f87609b9d53b2983806be58ccd02498a5cd3.zip libvncserver-4a83f87609b9d53b2983806be58ccd02498a5cd3.tar.gz |
x11vnc: Native Mac OS X support.
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r-- | x11vnc/connections.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c index 5ceb510..71608ec 100644 --- a/x11vnc/connections.c +++ b/x11vnc/connections.c @@ -16,6 +16,7 @@ #include "sslhelper.h" #include "xwrappers.h" #include "xevents.h" +#include "macosxCG.h" /* * routines for handling incoming, outgoing, etc connections @@ -746,6 +747,11 @@ void client_gone(rfbClientPtr client) { rfbLog("viewer exited.\n"); clean_up_exit(0); } +#ifdef MACOSX + if (! dpy && client_count == 0) { + macosxCG_refresh_callback_off(); + } +#endif } /* @@ -1204,7 +1210,7 @@ static unsigned char t2x2_bits[] = { ret = out; XSelectInput(dpy, awin, 0); XUnmapWindow(dpy, awin); - XFreeGC(dpy, gc); + XFree_wr(gc); XDestroyWindow(dpy, awin); XFlush_wr(dpy); break; @@ -1773,13 +1779,13 @@ void read_vnc_connect_prop(int nomsg) { /* too big */ rfbLog("warning: truncating large VNC_CONNECT" " string > %d bytes.\n", VNC_CONNECT_MAX); - XFree(data); + XFree_wr(data); break; } memcpy(vnc_connect_str+slen, data, dlen); slen += dlen; vnc_connect_str[slen] = '\0'; - XFree(data); + XFree_wr(data); } } while (bytes_after > 0); @@ -1823,13 +1829,13 @@ void read_x11vnc_remote_prop(int nomsg) { /* too big */ rfbLog("warning: truncating large X11VNC_REMOTE" " string > %d bytes.\n", X11VNC_REMOTE_MAX); - XFree(data); + XFree_wr(data); break; } memcpy(x11vnc_remote_str+slen, data, dlen); slen += dlen; x11vnc_remote_str[slen] = '\0'; - XFree(data); + XFree_wr(data); } } while (bytes_after > 0); @@ -2101,6 +2107,11 @@ enum rfbNewClientAction new_client(rfbClientPtr client) { */ autorepeat(0, 0); } +#ifdef MACOSX + if (! dpy && client_count == 1) { + macosxCG_refresh_callback_on(); + } +#endif if (use_solid_bg && client_count == 1) { solid_bg(0); } |