diff options
Diffstat (limited to 'x11vnc/gui.c')
-rw-r--r-- | x11vnc/gui.c | 13 |
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 |