summaryrefslogtreecommitdiffstats
path: root/x11vnc/gui.c
diff options
context:
space:
mode:
authorrunge <runge>2006-06-08 23:06:26 +0000
committerrunge <runge>2006-06-08 23:06:26 +0000
commit1776a3a55f59052bd69509c889e4370973305f0d (patch)
treee77c3c0b53a1f15c03bba215c60982bc3e28c727 /x11vnc/gui.c
parenta60ee2ee9f73d21c4407136d7a2878a34be2f7ed (diff)
downloadlibtdevnc-1776a3a55f59052bd69509c889e4370973305f0d.tar.gz
libtdevnc-1776a3a55f59052bd69509c889e4370973305f0d.zip
x11vnc: -display WAIT:..., -users unixpw=, su_verify dpy command.
Diffstat (limited to 'x11vnc/gui.c')
-rw-r--r--x11vnc/gui.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/x11vnc/gui.c b/x11vnc/gui.c
index 5c69b91..99d35ba 100644
--- a/x11vnc/gui.c
+++ b/x11vnc/gui.c
@@ -5,6 +5,7 @@
#include "win_utils.h"
#include "remote.h"
#include "cleanup.h"
+#include "xwrappers.h"
#include "tkx11vnc.h"
@@ -229,15 +230,15 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
} else {
old_xauth = strdup("");
}
- dpy = XOpenDisplay(x11vnc_xdisplay);
+ dpy = XOpenDisplay_wr(x11vnc_xdisplay);
if (! dpy && auth_file) {
set_env("XAUTHORITY", auth_file);
- dpy = XOpenDisplay(x11vnc_xdisplay);
+ dpy = XOpenDisplay_wr(x11vnc_xdisplay);
}
if (! dpy && ! x11vnc_xdisplay) {
/* worstest case */
x11vnc_xdisplay = strdup(":0");
- dpy = XOpenDisplay(x11vnc_xdisplay);
+ dpy = XOpenDisplay_wr(x11vnc_xdisplay);
}
if (! dpy) {
rfbLog("gui: could not open x11vnc "
@@ -310,7 +311,7 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
set_env("X11VNC_CONNECT_FILE", client_connect_file);
}
if (dpy) {
- XCloseDisplay(dpy);
+ XCloseDisplay_wr(dpy);
dpy = NULL;
}
if (old_xauth) {
@@ -418,6 +419,7 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
set_env("X11VNC_ICON_FONT", icon_mode_font);
}
+ /* gui */
if (no_external_cmds) {
fprintf(stderr, "cannot run external commands in -nocmds "
"mode:\n");
@@ -576,20 +578,20 @@ void do_gui(char *opts, int sleep) {
fprintf(stderr, "starting gui, trying display: %s\n",
gui_xdisplay);
}
- test_dpy = XOpenDisplay(gui_xdisplay);
+ test_dpy = XOpenDisplay_wr(gui_xdisplay);
if (! test_dpy && auth_file) {
if (getenv("XAUTHORITY") != NULL) {
old_xauth = strdup(getenv("XAUTHORITY"));
}
set_env("XAUTHORITY", auth_file);
- test_dpy = XOpenDisplay(gui_xdisplay);
+ test_dpy = XOpenDisplay_wr(gui_xdisplay);
}
if (! test_dpy) {
if (! old_xauth && getenv("XAUTHORITY") != NULL) {
old_xauth = strdup(getenv("XAUTHORITY"));
}
set_env("XAUTHORITY", "");
- test_dpy = XOpenDisplay(gui_xdisplay);
+ test_dpy = XOpenDisplay_wr(gui_xdisplay);
}
if (! test_dpy) {
fprintf(stderr, "error: cannot connect to gui X DISPLAY: %s\n",
@@ -603,7 +605,7 @@ void do_gui(char *opts, int sleep) {
tray_manager_ok = 0;
}
}
- XCloseDisplay(test_dpy);
+ XCloseDisplay_wr(test_dpy);
if (start_x11vnc) {