summaryrefslogtreecommitdiffstats
path: root/x11vnc/connections.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2009-12-18 11:46:10 -0500
committerrunge <runge@karlrunge.com>2009-12-18 11:46:10 -0500
commit06987b1c0216429e6744bf5a2c306d0e6853f879 (patch)
treef2a3f6e24d5742c4297130cdfc5673550ca53bae /x11vnc/connections.c
parentd6c012e9688d32d80c288541615c01cd082ecf0a (diff)
downloadlibtdevnc-06987b1c0216429e6744bf5a2c306d0e6853f879.tar.gz
libtdevnc-06987b1c0216429e6744bf5a2c306d0e6853f879.zip
x11vnc: fix keycode and other remote control actions under
DIRECT: with an extra XFlush and other safety measures. fflush(stderr) much in su_verify. Make the -unixpw env. vars UNIXPW_DISABLE_SSL and UNIXPW_DISABLE_LOCALHOST work correctly. Make -loopbg actually imply -bg.
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r--x11vnc/connections.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c
index 97d4c19..f6fd6aa 100644
--- a/x11vnc/connections.c
+++ b/x11vnc/connections.c
@@ -2783,6 +2783,7 @@ void reverse_connect(char *str) {
void set_vnc_connect_prop(char *str) {
RAWFB_RET_VOID
#if !NO_X11
+ if (vnc_connect_prop == None) return;
XChangeProperty(dpy, rootwin, vnc_connect_prop, XA_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str));
#else
@@ -2793,6 +2794,7 @@ void set_vnc_connect_prop(char *str) {
void set_x11vnc_remote_prop(char *str) {
RAWFB_RET_VOID
#if !NO_X11
+ if (x11vnc_remote_prop == None) return;
XChangeProperty(dpy, rootwin, x11vnc_remote_prop, XA_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str));
#else
@@ -3280,6 +3282,9 @@ int set_xprop(char *prop, Window win, char *value) {
win = rootwin;
}
aprop = XInternAtom(dpy, prop, False);
+ if (aprop == None) {
+ return rc;
+ }
rc = XChangeProperty(dpy, win, aprop, XA_STRING, 8,
PropModeReplace, (unsigned char *)value, strlen(value));
return rc;