summaryrefslogtreecommitdiffstats
path: root/x11vnc/xevents.c
diff options
context:
space:
mode:
authorrunge <runge>2006-03-06 16:29:35 +0000
committerrunge <runge>2006-03-06 16:29:35 +0000
commitc997e901c4c268438d063a78bdb121b8f5e8d585 (patch)
tree16f4ecab62e214d9348c9f7fcb008b2af609ada8 /x11vnc/xevents.c
parenta9a9c812f7feb5bfb1d017575762c6a6390227b9 (diff)
downloadlibtdevnc-c997e901c4c268438d063a78bdb121b8f5e8d585.tar.gz
libtdevnc-c997e901c4c268438d063a78bdb121b8f5e8d585.zip
x11vnc: gui speedup and fixes. -unixpw and -inetd
Diffstat (limited to 'x11vnc/xevents.c')
-rw-r--r--x11vnc/xevents.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c
index 58b9a55..3e9401b 100644
--- a/x11vnc/xevents.c
+++ b/x11vnc/xevents.c
@@ -18,6 +18,7 @@ int grab_buster = 0;
int sync_tod_delay = 3;
void initialize_vnc_connect_prop(void);
+void initialize_x11vnc_remote_prop(void);
void spawn_grab_buster(void);
void sync_tod_with_servertime(void);
void check_keycode_state(void);
@@ -39,10 +40,16 @@ void initialize_vnc_connect_prop(void) {
vnc_connect_prop = XInternAtom(dpy, "VNC_CONNECT", False);
}
+void initialize_x11vnc_remote_prop(void) {
+ x11vnc_remote_str[0] = '\0';
+ x11vnc_remote_prop = XInternAtom(dpy, "X11VNC_REMOTE", False);
+}
+
static void initialize_xevents(void) {
static int did_xselect_input = 0;
static int did_xcreate_simple_window = 0;
static int did_vnc_connect_prop = 0;
+ static int did_x11vnc_remote_prop = 0;
static int did_xfixes = 0;
static int did_xdamage = 0;
static int did_xrandr = 0;
@@ -75,6 +82,14 @@ static void initialize_xevents(void) {
initialize_vnc_connect_prop();
did_vnc_connect_prop = 1;
}
+ if (vnc_connect && !did_x11vnc_remote_prop) {
+ initialize_x11vnc_remote_prop();
+ did_x11vnc_remote_prop = 1;
+ }
+ if (run_gui_pid > 0) {
+ kill(run_gui_pid, SIGUSR1);
+ run_gui_pid = 0;
+ }
if (xfixes_present && use_xfixes && !did_xfixes) {
initialize_xfixes();
did_xfixes = 1;
@@ -744,11 +759,16 @@ void check_xevents(void) {
set_cutbuffer = 0;
} else if (vnc_connect && vnc_connect_prop != None
&& xev.xproperty.atom == vnc_connect_prop) {
-
/*
* Go retrieve VNC_CONNECT string.
*/
- read_vnc_connect_prop();
+ read_vnc_connect_prop(0);
+ } else if (vnc_connect && x11vnc_remote_prop != None
+ && xev.xproperty.atom == x11vnc_remote_prop) {
+ /*
+ * Go retrieve X11VNC_REMOTE string.
+ */
+ read_x11vnc_remote_prop(0);
}
}
}