summaryrefslogtreecommitdiffstats
path: root/x11vnc/gui.c
diff options
context:
space:
mode:
authorrunge <runge>2008-09-07 04:17:33 +0000
committerrunge <runge>2008-09-07 04:17:33 +0000
commitd5cba7a574a667f5321194cb05d0b4adcb995866 (patch)
tree2748fd38612cc63256ee864284cd8dab19f4eba1 /x11vnc/gui.c
parentdbfa4ad1f78f6133bc5f50e766f7f3bfdb8fa049 (diff)
downloadlibtdevnc-d5cba7a574a667f5321194cb05d0b4adcb995866.tar.gz
libtdevnc-d5cba7a574a667f5321194cb05d0b4adcb995866.zip
x11vnc: kill gui_pid on exit in -connect/-connect_or_exit mode.
-grablocal n experiment (not compiled by default). -macuskbd option for macosx for orig uskdb code. keycode=N remote contol cmd. Find dpy look at non-NFS cookies in /tmp. Fix gui tray insertion on recent gnome dt. Fix connect_file bug. Sync SSVNC
Diffstat (limited to 'x11vnc/gui.c')
-rw-r--r--x11vnc/gui.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/x11vnc/gui.c b/x11vnc/gui.c
index 35290b5..541af1f 100644
--- a/x11vnc/gui.c
+++ b/x11vnc/gui.c
@@ -25,6 +25,7 @@ Window tray_request = None;
Window tray_window = None;
int tray_unembed = 0;
pid_t run_gui_pid = 0;
+pid_t gui_pid = 0;
char *get_gui_code(void);
@@ -50,6 +51,10 @@ static Window tweak_tk_window_id(Window win) {
char *name = NULL;
Window parent, new;
+ if (getenv("NO_TWEAK_TK_WINDOW_ID")) {
+ return win;
+ }
+
/* hack for tk, does not report outermost window */
new = win;
parent = parent_window(win, &name);
@@ -684,8 +689,10 @@ void do_gui(char *opts, int sleep) {
fprintf(icon_mode_fh, "none\n");
fflush(icon_mode_fh);
if (! got_connect_once) {
- /* want -forever for tray */
- connect_once = 0;
+ if (!client_connect && !connect_or_exit) {
+ /* want -forever for tray? */
+ connect_once = 0;
+ }
}
}
}
@@ -707,6 +714,7 @@ void do_gui(char *opts, int sleep) {
}
if (connect_to_x11vnc) {
run_gui_pid = p;
+ gui_pid = p;
}
#else
fprintf(stderr, "system does not support fork: start "