summaryrefslogtreecommitdiffstats
path: root/x11vnc/xevents.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2009-12-15 09:17:37 -0500
committerrunge <runge@karlrunge.com>2009-12-15 09:17:37 -0500
commitd6c012e9688d32d80c288541615c01cd082ecf0a (patch)
tree83ab0988d56d3a4f29cd419a8d20381fb35ed128 /x11vnc/xevents.c
parent8f5c9ef01ef9101cf8f8d8f1eacdaab27ac7c2c8 (diff)
downloadlibvncserver-d6c012e9688d32d80c288541615c01cd082ecf0a.zip
libvncserver-d6c012e9688d32d80c288541615c01cd082ecf0a.tar.gz
X props names via env var. fakebuttonevent action, connect_switch and
ultravnc_repeater.pl scripts, find_display try FD_XDM on failure, -quiet and -storepasswd changes, better port 113 testing.
Diffstat (limited to 'x11vnc/xevents.c')
-rw-r--r--x11vnc/xevents.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c
index 37e0104..dadd197 100644
--- a/x11vnc/xevents.c
+++ b/x11vnc/xevents.c
@@ -87,18 +87,28 @@ static void grab_buster_watch(int parent, char *dstr);
void initialize_vnc_connect_prop(void) {
+ char *prop_str;
vnc_connect_str[0] = '\0';
RAWFB_RET_VOID
#if !NO_X11
+ prop_str = getenv("VNC_CONNECT");
+ if (prop_str == NULL) {
+ prop_str = "VNC_CONNECT";
+ }
vnc_connect_prop = XInternAtom(dpy, "VNC_CONNECT", False);
#endif
}
void initialize_x11vnc_remote_prop(void) {
+ char *prop_str;
x11vnc_remote_str[0] = '\0';
RAWFB_RET_VOID
#if !NO_X11
- x11vnc_remote_prop = XInternAtom(dpy, "X11VNC_REMOTE", False);
+ prop_str = getenv("X11VNC_REMOTE");
+ if (prop_str == NULL) {
+ prop_str = "X11VNC_REMOTE";
+ }
+ x11vnc_remote_prop = XInternAtom(dpy, prop_str, False);
#endif
}
@@ -734,6 +744,7 @@ static void grab_buster_watch(int parent, char *dstr) {
char propval[200];
int ev, er, maj, min;
int db = 0;
+ char *ticker_str = "X11VNC_TICKER";
RAWFB_RET_VOID
@@ -771,7 +782,10 @@ static void grab_buster_watch(int parent, char *dstr) {
usleep(3 * sleep);
- ticker_atom = XInternAtom(dpy, "X11VNC_TICKER", False);
+ if (getenv("X11VNC_TICKER")) {
+ ticker_str = getenv("X11VNC_TICKER");
+ }
+ ticker_atom = XInternAtom(dpy, ticker_str, False);
if (! ticker_atom) {
fprintf(stderr, "grab_buster_watch: no ticker atom\n");
return;
@@ -865,7 +879,11 @@ void sync_tod_with_servertime(void) {
}
if (! ticker_atom) {
- ticker_atom = XInternAtom(dpy, "X11VNC_TICKER", False);
+ char *ticker_str = "X11VNC_TICKER";
+ if (getenv("X11VNC_TICKER")) {
+ ticker_str = getenv("X11VNC_TICKER");
+ }
+ ticker_atom = XInternAtom(dpy, ticker_str, False);
}
if (! ticker_atom) {
return;
OpenPOWER on IntegriCloud