summaryrefslogtreecommitdiffstats
path: root/x11vnc/gui.c
diff options
context:
space:
mode:
authorrunge <runge>2006-11-13 15:33:00 +0000
committerrunge <runge>2006-11-13 15:33:00 +0000
commit4a83f87609b9d53b2983806be58ccd02498a5cd3 (patch)
treea79c96930a97fb162edd1765adece43425f8db8a /x11vnc/gui.c
parent5f9693d4a2c511f8f2ea069373807c5f36ac1459 (diff)
downloadlibtdevnc-4a83f87609b9d53b2983806be58ccd02498a5cd3.tar.gz
libtdevnc-4a83f87609b9d53b2983806be58ccd02498a5cd3.zip
x11vnc: Native Mac OS X support.
Diffstat (limited to 'x11vnc/gui.c')
-rw-r--r--x11vnc/gui.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/x11vnc/gui.c b/x11vnc/gui.c
index a02bd52..3e27783 100644
--- a/x11vnc/gui.c
+++ b/x11vnc/gui.c
@@ -60,7 +60,7 @@ static Window tweak_tk_window_id(Window win) {
}
}
if (name != NULL) {
- XFree(name);
+ XFree_wr(name);
}
return new;
#endif /* NO_X11 */
@@ -256,6 +256,9 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
if (! dpy) {
rfbLog("gui: could not open x11vnc "
"display: %s\n", NONUL(x11vnc_xdisplay));
+#ifdef MACOSX
+ goto macjump;
+#endif
exit(1);
}
scr = DefaultScreen(dpy);
@@ -263,6 +266,8 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
initialize_vnc_connect_prop();
initialize_x11vnc_remote_prop();
}
+
+ macjump:
signal(SIGUSR1, sigusr1);
got_sigusr1 = 0;
@@ -572,6 +577,10 @@ void do_gui(char *opts, int sleep) {
connect_to_x11vnc = 1;
}
+#ifdef MACOSX
+ goto startit;
+#endif
+
if (icon_mode && !got_gui_xdisplay) {
/* for tray mode, prefer the polled DISPLAY */
if (use_dpy) {
@@ -620,6 +629,8 @@ void do_gui(char *opts, int sleep) {
}
XCloseDisplay_wr(test_dpy);
+ startit:
+
if (start_x11vnc) {
#if LIBVNCSERVER_HAVE_FORK