Commit 901729e3 authored by runge's avatar runge

x11vnc: enable --without-x builds for -rawfb only binaries.

parent 6e2fa292
2006-07-17 Karl Runge <runge@karlrunge.com>
* configure.ac: move non-X11 tests out of HAVE_X: set
SSL_LIBS and CRYPT_LIBS and some header checks.
2006-07-12 Karl Runge <runge@karlrunge.com> 2006-07-12 Karl Runge <runge@karlrunge.com>
* libvncserver: release for CVE-2006-2450 fix. * libvncserver: release for CVE-2006-2450 fix.
......
...@@ -47,6 +47,7 @@ AC_CHECK_HEADER(thenonexistentheader.h, HAVE_THENONEXISTENTHEADER_H="true") ...@@ -47,6 +47,7 @@ AC_CHECK_HEADER(thenonexistentheader.h, HAVE_THENONEXISTENTHEADER_H="true")
# Checks for X libraries # Checks for X libraries
HAVE_X="false" HAVE_X="false"
AC_PATH_XTRA AC_PATH_XTRA
AH_TEMPLATE(HAVE_X11, [X11 build environment present])
AH_TEMPLATE(HAVE_XSHM, [MIT-SHM extension build environment present]) AH_TEMPLATE(HAVE_XSHM, [MIT-SHM extension build environment present])
AH_TEMPLATE(HAVE_XTEST, [XTEST extension build environment present]) AH_TEMPLATE(HAVE_XTEST, [XTEST extension build environment present])
AH_TEMPLATE(HAVE_XTESTGRABCONTROL, [XTEST extension has XTestGrabControl]) AH_TEMPLATE(HAVE_XTESTGRABCONTROL, [XTEST extension has XTestGrabControl])
...@@ -88,8 +89,10 @@ AC_ARG_WITH(fbdev, ...@@ -88,8 +89,10 @@ AC_ARG_WITH(fbdev,
AC_ARG_WITH(uinput, AC_ARG_WITH(uinput,
[ --without-uinput disable linux uinput device support],,) [ --without-uinput disable linux uinput device support],,)
if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then if test "x$with_x" = "xno"; then
AC_CHECK_LIB(X11, XGetImage, HAVE_X="true", HAVE_X="false"
elif test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
AC_CHECK_LIB(X11, XGetImage, [AC_DEFINE(HAVE_X11) HAVE_X="true"],
HAVE_X="false", HAVE_X="false",
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS) $X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
...@@ -193,81 +196,83 @@ if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then ...@@ -193,81 +196,83 @@ if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
esac esac
fi fi
# currently only x11vnc uses crypt() or libssl: X_LIBS="$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS"
AH_TEMPLATE(HAVE_LIBCRYPT, [libcrypt library present]) fi
AC_ARG_WITH(crypt, fi
[ --without-crypt disable support for libcrypt],,)
if test "x$with_crypt" != "xno"; then AC_SUBST(X_LIBS)
AM_CONDITIONAL(HAVE_X, test $HAVE_X != "false")
if test "$PACKAGE_NAME" = "x11vnc" -a "x$HAVE_X" = "xfalse" -a "x$with_x" != "xno"; then
AC_MSG_ERROR([
==========================================================================
A working X window system build environment is required to build x11vnc.
Make sure any required X development packages are installed. If they are
installed in non-standard locations, one can use the --x-includes=DIR
and --x-libraries=DIR configure options or set the CPPFLAGS and LDFLAGS
environment variables to indicate where the X window system header files
and libraries may be found. On 64+32 bit machines you may need to point
to lib64 or lib32 directories to pick up the correct word size.
==========================================================================
])
fi
AH_TEMPLATE(HAVE_LIBCRYPT, [libcrypt library present])
AC_ARG_WITH(crypt,
[ --without-crypt disable support for libcrypt],,)
if test "x$with_crypt" != "xno"; then
AC_CHECK_FUNCS([crypt], HAVE_LIBC_CRYPT="true") AC_CHECK_FUNCS([crypt], HAVE_LIBC_CRYPT="true")
if test -z "$HAVE_LIBC_CRYPT"; then if test -z "$HAVE_LIBC_CRYPT"; then
AC_CHECK_LIB(crypt, crypt, AC_CHECK_LIB(crypt, crypt,
X_PRELIBS="$X_PRELIBS -lcrypt" CRYPT_LIBS="-lcrypt"
[AC_DEFINE(HAVE_LIBCRYPT)], ,) [AC_DEFINE(HAVE_LIBCRYPT)], ,)
fi fi
fi fi
AC_SUBST(CRYPT_LIBS)
# some OS's need both -lssl and -lcrypto on link line: # some OS's need both -lssl and -lcrypto on link line:
AH_TEMPLATE(HAVE_LIBCRYPTO, [openssl libcrypto library present]) AH_TEMPLATE(HAVE_LIBCRYPTO, [openssl libcrypto library present])
AC_ARG_WITH(crypto, AC_ARG_WITH(crypto,
[ --without-crypto disable support for openssl libcrypto],,) [ --without-crypto disable support for openssl libcrypto],,)
AH_TEMPLATE(HAVE_LIBSSL, [openssl libssl library present]) AH_TEMPLATE(HAVE_LIBSSL, [openssl libssl library present])
AC_ARG_WITH(ssl, AC_ARG_WITH(ssl,
[ --without-ssl disable support for openssl libssl],,) [ --without-ssl disable support for openssl libssl],,)
if test "x$with_crypto" != "xno" -a "x$with_ssl" != "xno"; then if test "x$with_crypto" != "xno" -a "x$with_ssl" != "xno"; then
AC_CHECK_LIB(crypto, RAND_file_name, AC_CHECK_LIB(crypto, RAND_file_name,
[AC_DEFINE(HAVE_LIBCRYPTO) HAVE_LIBCRYPTO="true"], ,) [AC_DEFINE(HAVE_LIBCRYPTO) HAVE_LIBCRYPTO="true"], ,)
fi fi
if test "x$with_ssl" != "xno"; then if test "x$with_ssl" != "xno"; then
if test "x$HAVE_LIBCRYPTO" = "xtrue"; then if test "x$HAVE_LIBCRYPTO" = "xtrue"; then
AC_CHECK_LIB(ssl, SSL_library_init, AC_CHECK_LIB(ssl, SSL_library_init,
X_PRELIBS="$X_PRELIBS -lssl -lcrypto" SSL_LIBS="-lssl -lcrypto"
[AC_DEFINE(HAVE_LIBSSL) HAVE_LIBSSL="true"], , [AC_DEFINE(HAVE_LIBSSL) HAVE_LIBSSL="true"], ,
-lcrypto) -lcrypto)
else else
AC_CHECK_LIB(ssl, SSL_library_init, AC_CHECK_LIB(ssl, SSL_library_init,
X_PRELIBS="$X_PRELIBS -lssl" SSL_LIBS="-lssl"
[AC_DEFINE(HAVE_LIBSSL) HAVE_LIBSSL="true"], ,) [AC_DEFINE(HAVE_LIBSSL) HAVE_LIBSSL="true"], ,)
fi fi
fi fi
AC_SUBST(SSL_LIBS)
if test "x$with_v4l" != "xno"; then if test "x$with_v4l" != "xno"; then
AC_CHECK_HEADER(linux/videodev.h, AC_CHECK_HEADER(linux/videodev.h,
[AC_DEFINE(HAVE_LINUX_VIDEODEV_H)],,) [AC_DEFINE(HAVE_LINUX_VIDEODEV_H)],,)
fi fi
if test "x$with_fbdev" != "xno"; then if test "x$with_fbdev" != "xno"; then
AC_CHECK_HEADER(linux/fb.h, AC_CHECK_HEADER(linux/fb.h,
[AC_DEFINE(HAVE_LINUX_FB_H)],,) [AC_DEFINE(HAVE_LINUX_FB_H)],,)
fi fi
if test "x$with_uinput" != "xno"; then if test "x$with_uinput" != "xno"; then
AC_CHECK_HEADER(linux/input.h, AC_CHECK_HEADER(linux/input.h,
[AC_DEFINE(HAVE_LINUX_INPUT_H) HAVE_LINUX_INPUT_H="true"],,) [AC_DEFINE(HAVE_LINUX_INPUT_H) HAVE_LINUX_INPUT_H="true"],,)
if test "x$HAVE_LINUX_INPUT_H" = "xtrue"; then if test "x$HAVE_LINUX_INPUT_H" = "xtrue"; then
AC_CHECK_HEADER(linux/uinput.h, AC_CHECK_HEADER(linux/uinput.h,
[AC_DEFINE(HAVE_LINUX_UINPUT_H)],, [#include <linux/input.h>]) [AC_DEFINE(HAVE_LINUX_UINPUT_H)],, [#include <linux/input.h>])
fi fi
fi
X_LIBS="$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS"
fi
fi
AC_SUBST(X_LIBS)
AM_CONDITIONAL(HAVE_X, test $HAVE_X != "false")
if test "$PACKAGE_NAME" = "x11vnc" -a "x$HAVE_X" = "xfalse"; then
AC_MSG_ERROR([
==========================================================================
A working X window system build environment is required to build x11vnc.
Make sure any required X development packages are installed. If they are
installed in non-standard locations, one can use the --x-includes=DIR
and --x-libraries=DIR configure options or set the CPPFLAGS and LDFLAGS
environment variables to indicate where the X window system header files
and libraries may be found. On 64+32 bit machines you may need to point
to lib64 or lib32 directories to pick up the correct word size.
==========================================================================
])
fi fi
# Checks for libraries. # Checks for libraries.
......
...@@ -71,6 +71,9 @@ static void set_root_cmap(void) { ...@@ -71,6 +71,9 @@ static void set_root_cmap(void) {
int redo = 0; int redo = 0;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (now > last_set + 10) { if (now > last_set + 10) {
redo = 1; redo = 1;
...@@ -116,6 +119,7 @@ static void set_root_cmap(void) { ...@@ -116,6 +119,7 @@ static void set_root_cmap(void) {
} }
X_UNLOCK; X_UNLOCK;
} }
#endif /* NO_X11 */
} }
/* fixed size array. Will primarily hold visible 8bpp windows */ /* fixed size array. Will primarily hold visible 8bpp windows */
...@@ -256,6 +260,9 @@ void check_for_multivis(void) { ...@@ -256,6 +260,9 @@ void check_for_multivis(void) {
double delay; double delay;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (now > last_parse + 1.0) { if (now > last_parse + 1.0) {
last_parse = now; last_parse = now;
...@@ -529,6 +536,7 @@ if (0) fprintf(stderr, "MV_count: %d hit: %d %.4f %10.2f\n", MV_count, MV_hit, ...@@ -529,6 +536,7 @@ if (0) fprintf(stderr, "MV_count: %d hit: %d %.4f %10.2f\n", MV_count, MV_hit,
} }
} }
if (0) fprintf(stderr, "done: %.4f\n", dnow() - last_query); if (0) fprintf(stderr, "done: %.4f\n", dnow() - last_query);
#endif /* NO_X11 */
} }
#define VW_CACHE_MAX 1024 #define VW_CACHE_MAX 1024
...@@ -750,6 +758,9 @@ if (db24 > 1) fprintf(stderr, " ------------ 0x%lx i=%d\n", windows_8bp ...@@ -750,6 +758,9 @@ if (db24 > 1) fprintf(stderr, " ------------ 0x%lx i=%d\n", windows_8bp
static XImage *p_xi(XImage *xi, Visual *visual, int win_depth, int *w) { static XImage *p_xi(XImage *xi, Visual *visual, int win_depth, int *w) {
RAWFB_RET(NULL) RAWFB_RET(NULL)
#if NO_X11
return NULL;
#else
if (xi == NULL || *w < dpy_x) { if (xi == NULL || *w < dpy_x) {
char *d; char *d;
if (xi) { if (xi) {
...@@ -765,6 +776,7 @@ static XImage *p_xi(XImage *xi, Visual *visual, int win_depth, int *w) { ...@@ -765,6 +776,7 @@ static XImage *p_xi(XImage *xi, Visual *visual, int win_depth, int *w) {
dpy_x, 1, 8, 0); dpy_x, 1, 8, 0);
} }
return xi; return xi;
#endif /* NO_X11 */
} }
static int poll_line(int x1, int x2, int y1, int n, sraRegionPtr mod) { static int poll_line(int x1, int x2, int y1, int n, sraRegionPtr mod) {
...@@ -791,6 +803,9 @@ static int poll_line(int x1, int x2, int y1, int n, sraRegionPtr mod) { ...@@ -791,6 +803,9 @@ static int poll_line(int x1, int x2, int y1, int n, sraRegionPtr mod) {
RAWFB_RET(1) RAWFB_RET(1)
#if NO_X11
return 1;
#else
if (win == None) { if (win == None) {
return 1; return 1;
} }
...@@ -912,6 +927,7 @@ if (db24 > 2) fprintf(stderr, "avoid bad match...\n"); ...@@ -912,6 +927,7 @@ if (db24 > 2) fprintf(stderr, "avoid bad match...\n");
sraRgnDestroy(rect); sraRgnDestroy(rect);
} }
return 1; return 1;
#endif /* NO_X11 */
} }
static void poll_line_complement(int x1, int x2, int y1, sraRegionPtr mod) { static void poll_line_complement(int x1, int x2, int y1, sraRegionPtr mod) {
...@@ -1279,6 +1295,9 @@ static int get_cmap(int j, Colormap cmap) { ...@@ -1279,6 +1295,9 @@ static int get_cmap(int j, Colormap cmap) {
XErrorHandler old_handler = NULL; XErrorHandler old_handler = NULL;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (0) { if (0) {
/* not working properly for depth 24... */ /* not working properly for depth 24... */
...@@ -1345,6 +1364,7 @@ if (db24 > 2) fprintf(stderr, " cmap[%02d][%03d]: %03d %03d %03d 0x%08x \n", j, ...@@ -1345,6 +1364,7 @@ if (db24 > 2) fprintf(stderr, " cmap[%02d][%03d]: %03d %03d %03d 0x%08x \n", j,
rgb[j][i] = red | green | blue; rgb[j][i] = red | green | blue;
} }
return 1; return 1;
#endif /* NO_X11 */
} }
static void do_8bpp_region(int n, sraRegionPtr mark) { static void do_8bpp_region(int n, sraRegionPtr mark) {
...@@ -1409,6 +1429,9 @@ static XImage *cmap_xi(XImage *xi, Window win, int win_depth) { ...@@ -1409,6 +1429,9 @@ static XImage *cmap_xi(XImage *xi, Window win, int win_depth) {
XWindowAttributes attr; XWindowAttributes attr;
char *d; char *d;
#if NO_X11
return NULL;
#else
if (xi) { if (xi) {
XDestroyImage(xi); XDestroyImage(xi);
} }
...@@ -1426,6 +1449,7 @@ static XImage *cmap_xi(XImage *xi, Window win, int win_depth) { ...@@ -1426,6 +1449,7 @@ static XImage *cmap_xi(XImage *xi, Window win, int win_depth) {
} }
return XCreateImage(dpy, attr.visual, win_depth, ZPixmap, 0, d, dpy_x, return XCreateImage(dpy, attr.visual, win_depth, ZPixmap, 0, d, dpy_x,
dpy_y, 8, 0); dpy_y, 8, 0);
#endif /* NO_X11 */
} }
...@@ -1446,6 +1470,9 @@ static void transform_rect(sraRect rect, Window win, int win_depth, int cm) { ...@@ -1446,6 +1470,9 @@ static void transform_rect(sraRect rect, Window win, int win_depth, int cm) {
if (db24 > 1) fprintf(stderr, "transform %4d %4d %4d %4d cm: %d\n", rect.x1, rect.y1, rect.x2, rect.y2, cm); if (db24 > 1) fprintf(stderr, "transform %4d %4d %4d %4d cm: %d\n", rect.x1, rect.y1, rect.x2, rect.y2, cm);
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* now transform the pixels in this rectangle: */ /* now transform the pixels in this rectangle: */
n_off = main_bytes_per_line * rect.y1 + pixelsize * rect.x1; n_off = main_bytes_per_line * rect.y1 + pixelsize * rect.x1;
...@@ -1649,6 +1676,7 @@ if (db24) fprintf(stderr, "xi: wrong depth: %d\n", xi->depth); ...@@ -1649,6 +1676,7 @@ if (db24) fprintf(stderr, "xi: wrong depth: %d\n", xi->depth);
src += main_bytes_per_line * fac; src += main_bytes_per_line * fac;
} }
} }
#endif /* NO_X11 */
} }
void bpp8to24(int x1, int y1, int x2, int y2) { void bpp8to24(int x1, int y1, int x2, int y2) {
......
2006-07-17 Karl Runge <runge@karlrunge.com>
* x11vnc: enable --without-x builds for -rawfb only (NO_X11)
2006-07-11 Karl Runge <runge@karlrunge.com> 2006-07-11 Karl Runge <runge@karlrunge.com>
* x11vnc: more tweaks to UINPUT, mostly mouse motion. * x11vnc: more tweaks to UINPUT, mostly mouse motion.
......
...@@ -11,10 +11,12 @@ if CYGIPC ...@@ -11,10 +11,12 @@ if CYGIPC
LD_CYGIPC=-lcygipc LD_CYGIPC=-lcygipc
endif endif
if HAVE_X
bin_PROGRAMS=x11vnc bin_PROGRAMS=x11vnc
x11vnc_SOURCES = 8to24.c cleanup.c connections.c cursor.c gui.c help.c inet.c keyboard.c linuxfb.c options.c pm.c pointer.c rates.c remote.c scan.c screen.c selection.c solid.c sslcmds.c sslhelper.c uinput.c unixpw.c user.c userinput.c util.c v4l.c win_utils.c x11vnc.c x11vnc_defs.c xdamage.c xevents.c xinerama.c xkb_bell.c xrandr.c xrecord.c xwrappers.c 8to24.h allowed_input_t.h blackout_t.h cleanup.h connections.h cursor.h enums.h gui.h help.h inet.h keyboard.h linuxfb.h options.h params.h pm.h pointer.h rates.h remote.h scan.h screen.h scrollevent_t.h selection.h solid.h sslcmds.h sslhelper.h ssltools.h tkx11vnc.h uinput.h unixpw.h user.h userinput.h util.h v4l.h win_utils.h winattr_t.h x11vnc.h xdamage.h xevents.h xinerama.h xkb_bell.h xrandr.h xrecord.h xwrappers.h x11vnc_SOURCES = 8to24.c cleanup.c connections.c cursor.c gui.c help.c inet.c keyboard.c linuxfb.c options.c pm.c pointer.c rates.c remote.c scan.c screen.c selection.c solid.c sslcmds.c sslhelper.c uinput.c unixpw.c user.c userinput.c util.c v4l.c win_utils.c x11vnc.c x11vnc_defs.c xdamage.c xevents.c xinerama.c xkb_bell.c xrandr.c xrecord.c xwrappers.c 8to24.h allowed_input_t.h blackout_t.h cleanup.h connections.h cursor.h enums.h gui.h help.h inet.h keyboard.h linuxfb.h nox11.h nox11_funcs.h options.h params.h pm.h pointer.h rates.h remote.h scan.h screen.h scrollevent_t.h selection.h solid.h sslcmds.h sslhelper.h ssltools.h tkx11vnc.h uinput.h unixpw.h user.h userinput.h util.h v4l.h win_utils.h winattr_t.h x11vnc.h xdamage.h xevents.h xinerama.h xkb_bell.h xrandr.h xrecord.h xwrappers.h
if HAVE_X
INCLUDES=@X_CFLAGS@ INCLUDES=@X_CFLAGS@
x11vnc_LDADD=$(LDADD) @X_LIBS@ $(LD_CYGIPC) x11vnc_LDADD=$(LDADD) @SSL_LIBS@ @CRYPT_LIBS@ @X_LIBS@ $(LD_CYGIPC)
else
x11vnc_LDADD=$(LDADD) @SSL_LIBS@ @CRYPT_LIBS@ $(LD_CYGIPC)
endif endif
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -427,10 +427,14 @@ void initialize_signals(void) { ...@@ -427,10 +427,14 @@ void initialize_signals(void) {
signal(SIGPIPE, interrupted); signal(SIGPIPE, interrupted);
} }
#if NO_X11
return;
#else
X_LOCK; X_LOCK;
Xerror_def = XSetErrorHandler(Xerror); Xerror_def = XSetErrorHandler(Xerror);
XIOerr_def = XSetIOErrorHandler(XIOerr); XIOerr_def = XSetIOErrorHandler(XIOerr);
X_UNLOCK; X_UNLOCK;
#endif /* NO_X11 */
} }
void unset_signals(void) { void unset_signals(void) {
......
...@@ -911,6 +911,10 @@ static unsigned char t2x2_bits[] = { ...@@ -911,6 +911,10 @@ static unsigned char t2x2_bits[] = {
KeyCode key_o; KeyCode key_o;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
nox11_exit(1);
return 0;
#else
if (! accept) { if (! accept) {
sprintf(str_y, "OK"); sprintf(str_y, "OK");
...@@ -1168,6 +1172,7 @@ static unsigned char t2x2_bits[] = { ...@@ -1168,6 +1172,7 @@ static unsigned char t2x2_bits[] = {
X_UNLOCK; X_UNLOCK;
return ret; return ret;
#endif /* NO_X11 */
} }
/* /*
...@@ -1659,14 +1664,18 @@ void reverse_connect(char *str) { ...@@ -1659,14 +1664,18 @@ void reverse_connect(char *str) {
*/ */
void set_vnc_connect_prop(char *str) { void set_vnc_connect_prop(char *str) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if !NO_X11
XChangeProperty(dpy, rootwin, vnc_connect_prop, XA_STRING, 8, XChangeProperty(dpy, rootwin, vnc_connect_prop, XA_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str)); PropModeReplace, (unsigned char *)str, strlen(str));
#endif /* NO_X11 */
} }
void set_x11vnc_remote_prop(char *str) { void set_x11vnc_remote_prop(char *str) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if !NO_X11
XChangeProperty(dpy, rootwin, x11vnc_remote_prop, XA_STRING, 8, XChangeProperty(dpy, rootwin, x11vnc_remote_prop, XA_STRING, 8,
PropModeReplace, (unsigned char *)str, strlen(str)); PropModeReplace, (unsigned char *)str, strlen(str));
#endif /* NO_X11 */
} }
void read_vnc_connect_prop(int nomsg) { void read_vnc_connect_prop(int nomsg) {
...@@ -1684,6 +1693,9 @@ void read_vnc_connect_prop(int nomsg) { ...@@ -1684,6 +1693,9 @@ void read_vnc_connect_prop(int nomsg) {
return; return;
} }
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* read the property value into vnc_connect_str: */ /* read the property value into vnc_connect_str: */
do { do {
...@@ -1713,6 +1725,7 @@ void read_vnc_connect_prop(int nomsg) { ...@@ -1713,6 +1725,7 @@ void read_vnc_connect_prop(int nomsg) {
} else { } else {
rfbLog("read VNC_CONNECT: %s\n", vnc_connect_str); rfbLog("read VNC_CONNECT: %s\n", vnc_connect_str);
} }
#endif /* NO_X11 */
} }
void read_x11vnc_remote_prop(int nomsg) { void read_x11vnc_remote_prop(int nomsg) {
...@@ -1730,6 +1743,9 @@ void read_x11vnc_remote_prop(int nomsg) { ...@@ -1730,6 +1743,9 @@ void read_x11vnc_remote_prop(int nomsg) {
return; return;
} }
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* read the property value into x11vnc_remote_str: */ /* read the property value into x11vnc_remote_str: */
do { do {
...@@ -1777,6 +1793,7 @@ void read_x11vnc_remote_prop(int nomsg) { ...@@ -1777,6 +1793,7 @@ void read_x11vnc_remote_prop(int nomsg) {
} else { } else {
rfbLog("read X11VNC_REMOTE: %s\n", x11vnc_remote_str); rfbLog("read X11VNC_REMOTE: %s\n", x11vnc_remote_str);
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -2176,6 +2193,9 @@ void send_client_info(char *str) { ...@@ -2176,6 +2193,9 @@ void send_client_info(char *str) {
void adjust_grabs(int grab, int quiet) { void adjust_grabs(int grab, int quiet) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* n.b. caller decides to X_LOCK or not. */ /* n.b. caller decides to X_LOCK or not. */
if (grab) { if (grab) {
if (grab_kbd) { if (grab_kbd) {
...@@ -2206,6 +2226,7 @@ void adjust_grabs(int grab, int quiet) { ...@@ -2206,6 +2226,7 @@ void adjust_grabs(int grab, int quiet) {
XUngrabPointer(dpy, CurrentTime); XUngrabPointer(dpy, CurrentTime);
} }
} }
#endif /* NO_X11 */
} }
void check_new_clients(void) { void check_new_clients(void) {
......
...@@ -828,6 +828,9 @@ static void tree_descend_cursor(int *depth, Window *w, win_str_info_t *winfo) { ...@@ -828,6 +828,9 @@ static void tree_descend_cursor(int *depth, Window *w, win_str_info_t *winfo) {
XErrorHandler old_handler; XErrorHandler old_handler;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
X_LOCK; X_LOCK;
...@@ -914,6 +917,7 @@ static void tree_descend_cursor(int *depth, Window *w, win_str_info_t *winfo) { ...@@ -914,6 +917,7 @@ static void tree_descend_cursor(int *depth, Window *w, win_str_info_t *winfo) {
*depth = descend; *depth = descend;
*w = wins[descend]; *w = wins[descend];
#endif /* NO_X11 */
} }
void initialize_xfixes(void) { void initialize_xfixes(void) {
...@@ -1456,6 +1460,7 @@ int get_which_cursor(void) { ...@@ -1456,6 +1460,7 @@ int get_which_cursor(void) {
unsigned int w, h, bw, d; unsigned int w, h, bw, d;
Window r; Window r;
#if !NO_X11
trapped_xerror = 0; trapped_xerror = 0;
X_LOCK; X_LOCK;
old_handler = XSetErrorHandler(trap_xerror); old_handler = XSetErrorHandler(trap_xerror);
...@@ -1470,6 +1475,7 @@ int get_which_cursor(void) { ...@@ -1470,6 +1475,7 @@ int get_which_cursor(void) {
XSetErrorHandler(old_handler); XSetErrorHandler(old_handler);
X_UNLOCK; X_UNLOCK;
trapped_xerror = 0; trapped_xerror = 0;
#endif /* NO_X11 */
} }
if (which == which0) { if (which == which0) {
/* the string "term" mean I-beam. */ /* the string "term" mean I-beam. */
...@@ -1781,6 +1787,9 @@ int check_x11_pointer(void) { ...@@ -1781,6 +1787,9 @@ int check_x11_pointer(void) {
unsigned int mask; unsigned int mask;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (unixpw_in_progress) return 0; if (unixpw_in_progress) return 0;
...@@ -1811,5 +1820,6 @@ int check_x11_pointer(void) { ...@@ -1811,5 +1820,6 @@ int check_x11_pointer(void) {
/* change the cursor shape if necessary */ /* change the cursor shape if necessary */
return set_cursor(x, y, get_which_cursor()); return set_cursor(x, y, get_which_cursor());
#endif /* NO_X11 */
} }
...@@ -46,6 +46,9 @@ static Window tweak_tk_window_id(Window win) { ...@@ -46,6 +46,9 @@ static Window tweak_tk_window_id(Window win) {
char *name = NULL; char *name = NULL;
Window parent, new; Window parent, new;
#if NO_X11
return None;
#else
/* hack for tk, does not report outermost window */ /* hack for tk, does not report outermost window */
new = win; new = win;
parent = parent_window(win, &name); parent = parent_window(win, &name);
...@@ -60,6 +63,7 @@ static Window tweak_tk_window_id(Window win) { ...@@ -60,6 +63,7 @@ static Window tweak_tk_window_id(Window win) {
XFree(name); XFree(name);
} }
return new; return new;
#endif /* NO_X11 */
} }
int tray_embed(Window iconwin, int remove) { int tray_embed(Window iconwin, int remove) {
...@@ -73,6 +77,9 @@ int tray_embed(Window iconwin, int remove) { ...@@ -73,6 +77,9 @@ int tray_embed(Window iconwin, int remove) {
long data = 0; long data = 0;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (remove) { if (remove) {
if (!valid_window(iconwin, &attr, 1)) { if (!valid_window(iconwin, &attr, 1)) {
...@@ -153,6 +160,7 @@ int tray_embed(Window iconwin, int remove) { ...@@ -153,6 +160,7 @@ int tray_embed(Window iconwin, int remove) {
XSetErrorHandler(old_handler); XSetErrorHandler(old_handler);
trapped_xerror = 0; trapped_xerror = 0;
return 1; return 1;
#endif /* NO_X11 */
} }
static int tray_manager_running(Display *d, Window *manager) { static int tray_manager_running(Display *d, Window *manager) {
...@@ -161,6 +169,9 @@ static int tray_manager_running(Display *d, Window *manager) { ...@@ -161,6 +169,9 @@ static int tray_manager_running(Display *d, Window *manager) {
Window tray_win; Window tray_win;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (manager) { if (manager) {
*manager = None; *manager = None;
...@@ -182,6 +193,7 @@ static int tray_manager_running(Display *d, Window *manager) { ...@@ -182,6 +193,7 @@ static int tray_manager_running(Display *d, Window *manager) {
} else { } else {
return 1; return 1;
} }
#endif /* NO_X11 */
} }
static char *gui_geometry = NULL; static char *gui_geometry = NULL;
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "unixpw.h" #include "unixpw.h"
#include "v4l.h" #include "v4l.h"
#include "linuxfb.h" #include "linuxfb.h"
#include "uinput.h"
void get_keystate(int *keystate); void get_keystate(int *keystate);
void clear_modifiers(int init); void clear_modifiers(int init);
...@@ -58,6 +59,9 @@ void get_keystate(int *keystate) { ...@@ -58,6 +59,9 @@ void get_keystate(int *keystate) {
char keys[32]; char keys[32];
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* n.b. caller decides to X_LOCK or not. */ /* n.b. caller decides to X_LOCK or not. */
XQueryKeymap(dpy, keys); XQueryKeymap(dpy, keys);
...@@ -73,6 +77,7 @@ void get_keystate(int *keystate) { ...@@ -73,6 +77,7 @@ void get_keystate(int *keystate) {
c = c >> 1; c = c >> 1;
} }
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -90,6 +95,9 @@ void clear_modifiers(int init) { ...@@ -90,6 +95,9 @@ void clear_modifiers(int init) {
KeyCode keycode; KeyCode keycode;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* n.b. caller decides to X_LOCK or not. */ /* n.b. caller decides to X_LOCK or not. */
if (first) { if (first) {
...@@ -144,6 +152,7 @@ void clear_modifiers(int init) { ...@@ -144,6 +152,7 @@ void clear_modifiers(int init) {
XTestFakeKeyEvent_wr(dpy, keycode, False, CurrentTime); XTestFakeKeyEvent_wr(dpy, keycode, False, CurrentTime);
} }
XFlush_wr(dpy); XFlush_wr(dpy);
#endif /* NO_X11 */
} }
static KeySym simple_mods[] = { static KeySym simple_mods[] = {
...@@ -251,11 +260,15 @@ int get_autorepeat_state(void) { ...@@ -251,11 +260,15 @@ int get_autorepeat_state(void) {
XKeyboardState kstate; XKeyboardState kstate;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
X_LOCK; X_LOCK;
XGetKeyboardControl(dpy, &kstate); XGetKeyboardControl(dpy, &kstate);
X_UNLOCK; X_UNLOCK;
return kstate.global_auto_repeat; return kstate.global_auto_repeat;
#endif /* NO_X11 */
} }
int get_initial_autorepeat_state(void) { int get_initial_autorepeat_state(void) {
...@@ -270,6 +283,9 @@ void autorepeat(int restore, int bequiet) { ...@@ -270,6 +283,9 @@ void autorepeat(int restore, int bequiet) {
XKeyboardControl kctrl; XKeyboardControl kctrl;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (restore) { if (restore) {
if (save_auto_repeat < 0) { if (save_auto_repeat < 0) {
...@@ -316,6 +332,7 @@ void autorepeat(int restore, int bequiet) { ...@@ -316,6 +332,7 @@ void autorepeat(int restore, int bequiet) {
} }
} }
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -367,6 +384,9 @@ int add_keysym(KeySym keysym) { ...@@ -367,6 +384,9 @@ int add_keysym(KeySym keysym) {
} }
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (keysym == NoSymbol) { if (keysym == NoSymbol) {
return 0; return 0;
...@@ -440,6 +460,7 @@ int add_keysym(KeySym keysym) { ...@@ -440,6 +460,7 @@ int add_keysym(KeySym keysym) {
} }
XFree(keymap); XFree(keymap);
return ret; return ret;
#endif /* NO_X11 */
} }
static void delete_keycode(KeyCode kc, int bequiet) { static void delete_keycode(KeyCode kc, int bequiet) {
...@@ -449,6 +470,9 @@ static void delete_keycode(KeyCode kc, int bequiet) { ...@@ -449,6 +470,9 @@ static void delete_keycode(KeyCode kc, int bequiet) {
char *str; char *str;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
XDisplayKeycodes(dpy, &minkey, &maxkey); XDisplayKeycodes(dpy, &minkey, &maxkey);
keymap = XGetKeyboardMapping(dpy, minkey, (maxkey - minkey + 1), keymap = XGetKeyboardMapping(dpy, minkey, (maxkey - minkey + 1),
...@@ -469,6 +493,7 @@ static void delete_keycode(KeyCode kc, int bequiet) { ...@@ -469,6 +493,7 @@ static void delete_keycode(KeyCode kc, int bequiet) {
XFree(keymap); XFree(keymap);
XFlush_wr(dpy); XFlush_wr(dpy);
#endif /* NO_X11 */
} }
static int count_added_keycodes(void) { static int count_added_keycodes(void) {
...@@ -771,6 +796,9 @@ int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new) { ...@@ -771,6 +796,9 @@ int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new) {
} }
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (!down && !keycode_state[key] && !IsModifierKey(keysym)) { if (!down && !keycode_state[key] && !IsModifierKey(keysym)) {
int i, cnt = 0, downkey = -1; int i, cnt = 0, downkey = -1;
...@@ -817,6 +845,7 @@ int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new) { ...@@ -817,6 +845,7 @@ int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new) {
} }
} }
return 0; return 0;
#endif /* NO_X11 */
} }
#if !LIBVNCSERVER_HAVE_XKEYBOARD || SKIP_XKB #if !LIBVNCSERVER_HAVE_XKEYBOARD || SKIP_XKB
...@@ -2190,6 +2219,9 @@ void initialize_modtweak(void) { ...@@ -2190,6 +2219,9 @@ void initialize_modtweak(void) {
} }
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
X_LOCK; X_LOCK;
XDisplayKeycodes(dpy, &minkey, &maxkey); XDisplayKeycodes(dpy, &minkey, &maxkey);
...@@ -2267,6 +2299,7 @@ void initialize_modtweak(void) { ...@@ -2267,6 +2299,7 @@ void initialize_modtweak(void) {
XFree ((void *) keymap); XFree ((void *) keymap);
X_UNLOCK; X_UNLOCK;
#endif /* NO_X11 */
} }
/* /*
...@@ -2331,6 +2364,9 @@ static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym, ...@@ -2331,6 +2364,9 @@ static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym,
int tweak = 0; int tweak = 0;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (use_xkb_modtweak) { if (use_xkb_modtweak) {
xkb_tweak_keyboard(down, keysym, client); xkb_tweak_keyboard(down, keysym, client);
...@@ -2406,6 +2442,7 @@ static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym, ...@@ -2406,6 +2442,7 @@ static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym,
if ( tweak ) { if ( tweak ) {
tweak_mod(modifiers[keysym], False); tweak_mod(modifiers[keysym], False);
} }
#endif /* NO_X11 */
} }
void initialize_keyboard_and_pointer(void) { void initialize_keyboard_and_pointer(void) {
...@@ -2781,6 +2818,8 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { ...@@ -2781,6 +2818,8 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if (max_keyrepeat_always > 0.0) { if (max_keyrepeat_always > 0.0) {
max_keyrepeat_time = max_keyrepeat_always; max_keyrepeat_time = max_keyrepeat_always;
} }
#else
if (0) {max_keyrepeat_always=0;}
#endif #endif
if (!down && skipped_last_down) { if (!down && skipped_last_down) {
int db = debug_scroll; int db = debug_scroll;
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include "screen.h" #include "screen.h"
#include "pointer.h" #include "pointer.h"
#include "allowed_input_t.h" #include "allowed_input_t.h"
#include "uinput.h"
#include "keyboard.h"
#if LIBVNCSERVER_HAVE_SYS_IOCTL_H #if LIBVNCSERVER_HAVE_SYS_IOCTL_H
#include <sys/ioctl.h> #include <sys/ioctl.h>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "unixpw.h" #include "unixpw.h"
#include "v4l.h" #include "v4l.h"
#include "linuxfb.h" #include "linuxfb.h"
#include "uinput.h"
int pointer_queued_sent = 0; int pointer_queued_sent = 0;
...@@ -54,6 +55,9 @@ static void buttonparse(int from, char **s) { ...@@ -54,6 +55,9 @@ static void buttonparse(int from, char **s) {
int to, i; int to, i;
int modisdown[256]; int modisdown[256];
#if NO_X11
return;
#else
q = *s; q = *s;
for (i=0; i<256; i++) { for (i=0; i<256; i++) {
...@@ -201,6 +205,7 @@ static void buttonparse(int from, char **s) { ...@@ -201,6 +205,7 @@ static void buttonparse(int from, char **s) {
/* advance the source pointer position */ /* advance the source pointer position */
(*s)++; (*s)++;
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -216,6 +221,9 @@ void initialize_pointer_map(char *pointer_remap) { ...@@ -216,6 +221,9 @@ void initialize_pointer_map(char *pointer_remap) {
* from -buttonmap option. * from -buttonmap option.
*/ */
#if NO_X11
return;
#else
if (!raw_fb_str) { if (!raw_fb_str) {
X_LOCK; X_LOCK;
num_buttons = XGetPointerMapping(dpy, map, MAX_BUTTONS); num_buttons = XGetPointerMapping(dpy, map, MAX_BUTTONS);
...@@ -282,6 +290,7 @@ void initialize_pointer_map(char *pointer_remap) { ...@@ -282,6 +290,7 @@ void initialize_pointer_map(char *pointer_remap) {
} }
free(remap); free(remap);
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -291,6 +300,9 @@ static void update_x11_pointer_position(int x, int y) { ...@@ -291,6 +300,9 @@ static void update_x11_pointer_position(int x, int y) {
int rc; int rc;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
X_LOCK; X_LOCK;
if (use_xwarppointer) { if (use_xwarppointer) {
...@@ -321,11 +333,15 @@ static void update_x11_pointer_position(int x, int y) { ...@@ -321,11 +333,15 @@ static void update_x11_pointer_position(int x, int y) {
cursor_changes += rc; cursor_changes += rc;
last_event = last_input = last_pointer_input = time(NULL); last_event = last_input = last_pointer_input = time(NULL);
#endif /* NO_X11 */
} }
void do_button_mask_change(int mask, int button) { void do_button_mask_change(int mask, int button) {
int mb, k, i = button-1; int mb, k, i = button-1;
#if NO_X11
return;
#else
/* /*
* this expands to any pointer_map button -> keystrokes * this expands to any pointer_map button -> keystrokes
* remappings. Usually just k=0 and we send one button event. * remappings. Usually just k=0 and we send one button event.
...@@ -383,6 +399,7 @@ void do_button_mask_change(int mask, int button) { ...@@ -383,6 +399,7 @@ void do_button_mask_change(int mask, int button) {
} }
} }
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -394,6 +411,9 @@ static void update_x11_pointer_mask(int mask) { ...@@ -394,6 +411,9 @@ static void update_x11_pointer_mask(int mask) {
last_event = last_input = last_pointer_input = time(NULL); last_event = last_input = last_pointer_input = time(NULL);
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (mask != button_mask) { if (mask != button_mask) {
last_pointer_click_time = dnow(); last_pointer_click_time = dnow();
...@@ -508,6 +528,7 @@ if (debug_scroll > 1) fprintf(stderr, "internal scrollbar: %dx%d\n", w, h); ...@@ -508,6 +528,7 @@ if (debug_scroll > 1) fprintf(stderr, "internal scrollbar: %dx%d\n", w, h);
*/ */
button_mask_prev = button_mask; button_mask_prev = button_mask;
button_mask = mask; button_mask = mask;
#endif /* NO_X11 */
} }
/* for -pipeinput */ /* for -pipeinput */
......
...@@ -492,6 +492,9 @@ static void reset_rfbport(int old, int new) { ...@@ -492,6 +492,9 @@ static void reset_rfbport(int old, int new) {
int remote_control_access_ok(void) { int remote_control_access_ok(void) {
struct stat sbuf; struct stat sbuf;
#if NO_X11
return 0;
#else
if (client_connect_file) { if (client_connect_file) {
if (stat(client_connect_file, &sbuf) == 0) { if (stat(client_connect_file, &sbuf) == 0) {
if (sbuf.st_mode & S_IWOTH) { if (sbuf.st_mode & S_IWOTH) {
...@@ -614,6 +617,7 @@ int remote_control_access_ok(void) { ...@@ -614,6 +617,7 @@ int remote_control_access_ok(void) {
} }
return 1; return 1;
#endif /* NO_X11 */
} }
static int hack_val = 0; static int hack_val = 0;
...@@ -3082,9 +3086,11 @@ char *process_remote_cmd(char *cmd, int stringonly) { ...@@ -3082,9 +3086,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
} }
grab_kbd = 0; grab_kbd = 0;
if (orig && dpy) { if (orig && dpy) {
#if !NO_X11
X_LOCK; X_LOCK;
XUngrabKeyboard(dpy, CurrentTime); XUngrabKeyboard(dpy, CurrentTime);
X_UNLOCK; X_UNLOCK;
#endif
} }
rfbLog("disabled grab_kbd\n"); rfbLog("disabled grab_kbd\n");
} else if (!strcmp(p, "grabptr")) { } else if (!strcmp(p, "grabptr")) {
...@@ -3102,9 +3108,11 @@ char *process_remote_cmd(char *cmd, int stringonly) { ...@@ -3102,9 +3108,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
} }
grab_ptr = 0; grab_ptr = 0;
if (orig && dpy) { if (orig && dpy) {
#if !NO_X11
X_LOCK; X_LOCK;
XUngrabPointer(dpy, CurrentTime); XUngrabPointer(dpy, CurrentTime);
X_UNLOCK; X_UNLOCK;
#endif
} }
rfbLog("disabled grab_ptr\n"); rfbLog("disabled grab_ptr\n");
......
...@@ -168,6 +168,9 @@ if (0) fprintf(stderr, "unset_colormap: %d\n", reset); ...@@ -168,6 +168,9 @@ if (0) fprintf(stderr, "unset_colormap: %d\n", reset);
} }
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
X_LOCK; X_LOCK;
...@@ -274,6 +277,7 @@ if (0) fprintf(stderr, "unset_colormap: %d\n", reset); ...@@ -274,6 +277,7 @@ if (0) fprintf(stderr, "unset_colormap: %d\n", reset);
} }
init = 0; init = 0;
#endif /* NO_X11 */
} }
static void debug_colormap(XImage *fb) { static void debug_colormap(XImage *fb) {
...@@ -336,6 +340,9 @@ static void set_visual(char *str) { ...@@ -336,6 +340,9 @@ static void set_visual(char *str) {
char *p, *vstring = strdup(str); char *p, *vstring = strdup(str);
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
defdepth = DefaultDepth(dpy, scr); defdepth = DefaultDepth(dpy, scr);
visual_id = (VisualID) 0; visual_id = (VisualID) 0;
...@@ -406,6 +413,7 @@ static void set_visual(char *str) { ...@@ -406,6 +413,7 @@ static void set_visual(char *str) {
/* set numerical visual id. */ /* set numerical visual id. */
visual_id = vinfo.visualid; visual_id = vinfo.visualid;
#endif /* NO_X11 */
} }
void set_nofb_params(int restore) { void set_nofb_params(int restore) {
...@@ -1356,6 +1364,9 @@ static int wait_until_mapped(Window win) { ...@@ -1356,6 +1364,9 @@ static int wait_until_mapped(Window win) {
time_t start = time(NULL); time_t start = time(NULL);
XWindowAttributes attr; XWindowAttributes attr;
#if NO_X11
return 0;
#else
while (1) { while (1) {
if (! valid_window(win, NULL, 0)) { if (! valid_window(win, NULL, 0)) {
if (time(NULL) > start + waittime) { if (time(NULL) > start + waittime) {
...@@ -1373,6 +1384,7 @@ static int wait_until_mapped(Window win) { ...@@ -1373,6 +1384,7 @@ static int wait_until_mapped(Window win) {
usleep(ms * 1000); usleep(ms * 1000);
} }
return 0; return 0;
#endif /* NO_X11 */
} }
/* /*
...@@ -1388,6 +1400,9 @@ XImage *initialize_xdisplay_fb(void) { ...@@ -1388,6 +1400,9 @@ XImage *initialize_xdisplay_fb(void) {
if (raw_fb_str) { if (raw_fb_str) {
return initialize_raw_fb(0); return initialize_raw_fb(0);
} }
#if NO_X11
return NULL;
#else
X_LOCK; X_LOCK;
if (subwin) { if (subwin) {
...@@ -1638,6 +1653,7 @@ if (0) fprintf(stderr, "DefaultDepth: %d visial_id: %d\n", depth, (int) visual_ ...@@ -1638,6 +1653,7 @@ if (0) fprintf(stderr, "DefaultDepth: %d visial_id: %d\n", depth, (int) visual_
rfbLog("warning: 24 bpp may have poor performance.\n"); rfbLog("warning: 24 bpp may have poor performance.\n");
} }
return fb; return fb;
#endif /* NO_X11 */
} }
void parse_scale_string(char *str, double *factor, int *scaling, int *blend, void parse_scale_string(char *str, double *factor, int *scaling, int *blend,
...@@ -1983,7 +1999,11 @@ void initialize_screen(int *argc, char **argv, XImage *fb) { ...@@ -1983,7 +1999,11 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
have_masks = 2; have_masks = 2;
/* need to fetch TrueColor visual */ /* need to fetch TrueColor visual */
X_LOCK; X_LOCK;
if (dpy && XMatchVisualInfo(dpy, scr, 24, TrueColor, &vinfo)) { if (dpy
#if !NO_X11
&& XMatchVisualInfo(dpy, scr, 24, TrueColor, &vinfo)
#endif
) {
main_red_mask = vinfo.red_mask; main_red_mask = vinfo.red_mask;
main_green_mask = vinfo.green_mask; main_green_mask = vinfo.green_mask;
main_blue_mask = vinfo.blue_mask; main_blue_mask = vinfo.blue_mask;
......
...@@ -61,6 +61,9 @@ void selection_request(XEvent *ev, char *type) { ...@@ -61,6 +61,9 @@ void selection_request(XEvent *ev, char *type) {
unsigned long XA_LENGTH; unsigned long XA_LENGTH;
#endif #endif
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
#ifndef XA_LENGTH #ifndef XA_LENGTH
XA_LENGTH = XInternAtom(dpy, "LENGTH", True); XA_LENGTH = XInternAtom(dpy, "LENGTH", True);
#endif #endif
...@@ -134,6 +137,7 @@ void selection_request(XEvent *ev, char *type) { ...@@ -134,6 +137,7 @@ void selection_request(XEvent *ev, char *type) {
trapped_xerror = 0; trapped_xerror = 0;
XFlush_wr(dpy); XFlush_wr(dpy);
#endif /* NO_X11 */
} }
int check_sel_direction(char *dir, char *label, char *sel, int len) { int check_sel_direction(char *dir, char *label, char *sel, int len) {
...@@ -185,6 +189,9 @@ void cutbuffer_send(void) { ...@@ -185,6 +189,9 @@ void cutbuffer_send(void) {
slen = 0; slen = 0;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* read the property value into cutbuffer_str: */ /* read the property value into cutbuffer_str: */
do { do {
...@@ -230,6 +237,7 @@ void cutbuffer_send(void) { ...@@ -230,6 +237,7 @@ void cutbuffer_send(void) {
if (check_sel_direction("send", "cutbuffer_send", cutbuffer_str, len)) { if (check_sel_direction("send", "cutbuffer_send", cutbuffer_str, len)) {
rfbSendServerCutText(screen, cutbuffer_str, len); rfbSendServerCutText(screen, cutbuffer_str, len);
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -255,6 +263,9 @@ void selection_send(XEvent *ev) { ...@@ -255,6 +263,9 @@ void selection_send(XEvent *ev) {
char *selection_str; char *selection_str;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
/* /*
* remember info about our last value of PRIMARY (or CUT_BUFFER0) * remember info about our last value of PRIMARY (or CUT_BUFFER0)
* so we can check for any changes below. * so we can check for any changes below.
...@@ -368,6 +379,7 @@ if (debug_sel) fprintf(stderr, "selection_send: data: '%s' dlen: %d nitems: %lu ...@@ -368,6 +379,7 @@ if (debug_sel) fprintf(stderr, "selection_send: data: '%s' dlen: %d nitems: %lu
if (check_sel_direction("send", "selection_send", selection_str, len)) { if (check_sel_direction("send", "selection_send", selection_str, len)) {
rfbSendServerCutText(screen, selection_str, len); rfbSendServerCutText(screen, selection_str, len);
} }
#endif /* NO_X11 */
} }
...@@ -123,6 +123,9 @@ static void solid_root(char *color) { ...@@ -123,6 +123,9 @@ static void solid_root(char *color) {
Colormap cmap; Colormap cmap;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (subwin || window != rootwin) { if (subwin || window != rootwin) {
rfbLog("cannot set subwin to solid color, must be rootwin\n"); rfbLog("cannot set subwin to solid color, must be rootwin\n");
...@@ -216,6 +219,7 @@ static void solid_root(char *color) { ...@@ -216,6 +219,7 @@ static void solid_root(char *color) {
XMapWindow(dpy, expose); XMapWindow(dpy, expose);
XSync(dpy, False); XSync(dpy, False);
XDestroyWindow(dpy, expose); XDestroyWindow(dpy, expose);
#endif /* NO_X11 */
} }
static void solid_cde(char *color) { static void solid_cde(char *color) {
...@@ -236,6 +240,9 @@ static void solid_cde(char *color) { ...@@ -236,6 +240,9 @@ static void solid_cde(char *color) {
int n; int n;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (subwin || window != rootwin) { if (subwin || window != rootwin) {
rfbLog("cannot set subwin to solid color, must be rootwin\n"); rfbLog("cannot set subwin to solid color, must be rootwin\n");
...@@ -476,6 +483,7 @@ static void solid_cde(char *color) { ...@@ -476,6 +483,7 @@ static void solid_cde(char *color) {
XMapWindow(dpy, expose); XMapWindow(dpy, expose);
XSync(dpy, False); XSync(dpy, False);
XDestroyWindow(dpy, expose); XDestroyWindow(dpy, expose);
#endif /* NO_X11 */
} }
static void solid_gnome(char *color) { static void solid_gnome(char *color) {
...@@ -492,6 +500,9 @@ static void solid_gnome(char *color) { ...@@ -492,6 +500,9 @@ static void solid_gnome(char *color) {
char *cmd; char *cmd;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (! color) { if (! color) {
if (! orig_color) { if (! orig_color) {
...@@ -562,6 +573,7 @@ static void solid_gnome(char *color) { ...@@ -562,6 +573,7 @@ static void solid_gnome(char *color) {
sprintf(cmd, set_option, "none"); sprintf(cmd, set_option, "none");
dt_cmd(cmd); dt_cmd(cmd);
free(cmd); free(cmd);
#endif /* NO_X11 */
} }
static void solid_kde(char *color) { static void solid_kde(char *color) {
...@@ -575,6 +587,9 @@ static void solid_kde(char *color) { ...@@ -575,6 +587,9 @@ static void solid_kde(char *color) {
int len; int len;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
user = get_user_name(); user = get_user_name();
if (strstr(user, "'") != NULL) { if (strstr(user, "'") != NULL) {
...@@ -611,12 +626,16 @@ static void solid_kde(char *color) { ...@@ -611,12 +626,16 @@ static void solid_kde(char *color) {
dt_cmd(cmd); dt_cmd(cmd);
free(cmd); free(cmd);
free(user); free(user);
#endif /* NO_X11 */
} }
char *guess_desktop(void) { char *guess_desktop(void) {
Atom prop; Atom prop;
RAWFB_RET("root") RAWFB_RET("root")
#if NO_X11
return "root";
#else
if (wmdt_str && *wmdt_str != '\0') { if (wmdt_str && *wmdt_str != '\0') {
char *s = wmdt_str; char *s = wmdt_str;
...@@ -662,6 +681,7 @@ char *guess_desktop(void) { ...@@ -662,6 +681,7 @@ char *guess_desktop(void) {
if (prop != None) return "cde"; if (prop != None) return "cde";
} }
return "root"; return "root";
#endif /* NO_X11 */
} }
void solid_bg(int restore) { void solid_bg(int restore) {
......
...@@ -1543,27 +1543,27 @@ void accept_openssl(int mode) { ...@@ -1543,27 +1543,27 @@ void accept_openssl(int mode) {
* instead of a direct SSL connection. * instead of a direct SSL connection.
*/ */
rfbLog("Handling VNC request via https GET. [%d]\n", getpid()); rfbLog("Handling VNC request via https GET. [%d]\n", getpid());
/* AUDIT */
if (strstr(buf, "/reverse.proxy")) { if (strstr(buf, "/reverse.proxy")) {
char *buf; char *buf2;
int n, ptr; int n, ptr;
SSL_write(ssl, reply, strlen(reply)); SSL_write(ssl, reply, strlen(reply));
buf = (char *) calloc((8192+1), 1); buf2 = (char *) calloc((8192+1), 1);
n = 0; n = 0;
ptr = 0; ptr = 0;
while (ptr < 8192) { while (ptr < 8192) {
n = SSL_read(ssl, buf + ptr, 1); n = SSL_read(ssl, buf2 + ptr, 1);
if (n > 0) { if (n > 0) {
ptr += n; ptr += n;
} }
if (db) fprintf(stderr, "buf2: '%s'\n", buf); if (db) fprintf(stderr, "buf2: '%s'\n", buf2);
if (strstr(buf, "\r\n\r\n")) { if (strstr(buf2, "\r\n\r\n")) {
break; break;
} }
} }
free(buf2);
} }
goto write_cookie; goto write_cookie;
...@@ -1672,6 +1672,7 @@ if (db) fprintf(stderr, "iface: %s\n", iface); ...@@ -1672,6 +1672,7 @@ if (db) fprintf(stderr, "iface: %s\n", iface);
exit(0); exit(0);
} }
/* parent here */
if (mode != OPENSSL_INETD) { if (mode != OPENSSL_INETD) {
close(sock); close(sock);
...@@ -2106,6 +2107,7 @@ static void ssl_xfer(int csock, int s_in, int s_out, int is_https) { ...@@ -2106,6 +2107,7 @@ static void ssl_xfer(int csock, int s_in, int s_out, int is_https) {
/* used to see if SSL_pending() should be checked: */ /* used to see if SSL_pending() should be checked: */
check_pending = 0; check_pending = 0;
/* AUDIT */
if (c_wr && FD_ISSET(csock, &wr)) { if (c_wr && FD_ISSET(csock, &wr)) {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "xinerama.h" #include "xinerama.h"
#include "screen.h" #include "screen.h"
#include "pointer.h" #include "pointer.h"
#include "keyboard.h"
#include "allowed_input_t.h" #include "allowed_input_t.h"
#if LIBVNCSERVER_HAVE_SYS_IOCTL_H #if LIBVNCSERVER_HAVE_SYS_IOCTL_H
...@@ -120,6 +121,7 @@ static void init_key_tracker(void) { ...@@ -120,6 +121,7 @@ static void init_key_tracker(void) {
static int mod_is_down(void) { static int mod_is_down(void) {
int i; int i;
if (0) {key_is_down();}
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
if (key_pressed[i] && key_ismod[i]) { if (key_pressed[i] && key_ismod[i]) {
return 1; return 1;
...@@ -281,7 +283,7 @@ void set_uinput_reset(int ms) { ...@@ -281,7 +283,7 @@ void set_uinput_reset(int ms) {
rfbLog("set_uinput_reset: %d\n", ms); rfbLog("set_uinput_reset: %d\n", ms);
} }
int set_uinput_always(int a) { void set_uinput_always(int a) {
uinput_always = a; uinput_always = a;
} }
...@@ -315,7 +317,6 @@ void parse_uinput_str(char *in) { ...@@ -315,7 +317,6 @@ void parse_uinput_str(char *in) {
} }
uinput_dev = strdup(p); uinput_dev = strdup(p);
} else if (strstr(p, "accel=") == p) { } else if (strstr(p, "accel=") == p) {
double fx, fy;
q = p + strlen("accel="); q = p + strlen("accel=");
if (! set_uinput_accel(q)) { if (! set_uinput_accel(q)) {
clean_up_exit(1); clean_up_exit(1);
......
...@@ -97,6 +97,9 @@ int get_wm_frame_pos(int *px, int *py, int *x, int *y, int *w, int *h, ...@@ -97,6 +97,9 @@ int get_wm_frame_pos(int *px, int *py, int *x, int *y, int *w, int *h,
unsigned int mask; unsigned int mask;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
ret = XQueryPointer(dpy, rootwin, &r, &c, &rootx, &rooty, &wx, &wy, ret = XQueryPointer(dpy, rootwin, &r, &c, &rootx, &rooty, &wx, &wy,
&mask); &mask);
...@@ -127,6 +130,7 @@ int get_wm_frame_pos(int *px, int *py, int *x, int *y, int *w, int *h, ...@@ -127,6 +130,7 @@ int get_wm_frame_pos(int *px, int *py, int *x, int *y, int *w, int *h,
} }
return 1; return 1;
#endif /* NO_X11 */
} }
static int scrollcopyrect_top, scrollcopyrect_bot; static int scrollcopyrect_top, scrollcopyrect_bot;
...@@ -299,6 +303,7 @@ static void parse_wireframe_str(char *wf) { ...@@ -299,6 +303,7 @@ static void parse_wireframe_str(char *wf) {
XColor cdef; XColor cdef;
Colormap cmap; Colormap cmap;
if (dpy && (bpp == 32 || bpp == 16)) { if (dpy && (bpp == 32 || bpp == 16)) {
#if !NO_X11
cmap = DefaultColormap (dpy, scr); cmap = DefaultColormap (dpy, scr);
if (XParseColor(dpy, cmap, str, &cdef) && if (XParseColor(dpy, cmap, str, &cdef) &&
XAllocColor(dpy, cmap, &cdef)) { XAllocColor(dpy, cmap, &cdef)) {
...@@ -315,6 +320,7 @@ static void parse_wireframe_str(char *wf) { ...@@ -315,6 +320,7 @@ static void parse_wireframe_str(char *wf) {
wireframe_shade = n; wireframe_shade = n;
ok = 1; ok = 1;
} }
#endif
} }
if (ok) { if (ok) {
; ;
......
...@@ -536,6 +536,7 @@ char *choose_title(char *display) { ...@@ -536,6 +536,7 @@ char *choose_title(char *display) {
strncat(title, display, MAXN - strlen(title)); strncat(title, display, MAXN - strlen(title));
if (subwin && dpy && valid_window(subwin, NULL, 0)) { if (subwin && dpy && valid_window(subwin, NULL, 0)) {
char *name = NULL; char *name = NULL;
#if !NO_X11
if (XFetchName(dpy, subwin, &name)) { if (XFetchName(dpy, subwin, &name)) {
if (name) { if (name) {
strncat(title, " ", MAXN - strlen(title)); strncat(title, " ", MAXN - strlen(title));
...@@ -543,6 +544,7 @@ char *choose_title(char *display) { ...@@ -543,6 +544,7 @@ char *choose_title(char *display) {
free(name); free(name);
} }
} }
#endif /* NO_X11 */
} }
return title; return title;
} }
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "xinerama.h" #include "xinerama.h"
#include "screen.h" #include "screen.h"
#include "connections.h" #include "connections.h"
#include "keyboard.h"
#include "allowed_input_t.h" #include "allowed_input_t.h"
#if LIBVNCSERVER_HAVE_LINUX_VIDEODEV_H #if LIBVNCSERVER_HAVE_LINUX_VIDEODEV_H
......
...@@ -36,6 +36,10 @@ Window parent_window(Window win, char **name) { ...@@ -36,6 +36,10 @@ Window parent_window(Window win, char **name) {
*name = NULL; *name = NULL;
} }
RAWFB_RET(None) RAWFB_RET(None)
#if NO_X11
nox11_exit(1);
return None;
#else
old_handler = XSetErrorHandler(trap_xerror); old_handler = XSetErrorHandler(trap_xerror);
trapped_xerror = 0; trapped_xerror = 0;
...@@ -55,6 +59,7 @@ Window parent_window(Window win, char **name) { ...@@ -55,6 +59,7 @@ Window parent_window(Window win, char **name) {
XFetchName(dpy, parent, name); XFetchName(dpy, parent, name);
} }
return parent; return parent;
#endif /* NO_X11 */
} }
/* trapping utility to check for a valid window: */ /* trapping utility to check for a valid window: */
...@@ -73,6 +78,10 @@ int valid_window(Window win, XWindowAttributes *attr_ret, int bequiet) { ...@@ -73,6 +78,10 @@ int valid_window(Window win, XWindowAttributes *attr_ret, int bequiet) {
return 0; return 0;
} }
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
nox11_exit(1);
return 0;
#else
old_handler = XSetErrorHandler(trap_xerror); old_handler = XSetErrorHandler(trap_xerror);
trapped_xerror = 0; trapped_xerror = 0;
...@@ -90,6 +99,7 @@ int valid_window(Window win, XWindowAttributes *attr_ret, int bequiet) { ...@@ -90,6 +99,7 @@ int valid_window(Window win, XWindowAttributes *attr_ret, int bequiet) {
trapped_xerror = 0; trapped_xerror = 0;
return ok; return ok;
#endif /* NO_X11 */
} }
Bool xtranslate(Window src, Window dst, int src_x, int src_y, int *dst_x, Bool xtranslate(Window src, Window dst, int src_x, int src_y, int *dst_x,
...@@ -98,6 +108,10 @@ Bool xtranslate(Window src, Window dst, int src_x, int src_y, int *dst_x, ...@@ -98,6 +108,10 @@ Bool xtranslate(Window src, Window dst, int src_x, int src_y, int *dst_x,
Bool ok = False; Bool ok = False;
RAWFB_RET(False) RAWFB_RET(False)
#if NO_X11
nox11_exit(1);
return False;
#else
trapped_xerror = 0; trapped_xerror = 0;
old_handler = XSetErrorHandler(trap_xerror); old_handler = XSetErrorHandler(trap_xerror);
...@@ -116,6 +130,7 @@ Bool xtranslate(Window src, Window dst, int src_x, int src_y, int *dst_x, ...@@ -116,6 +130,7 @@ Bool xtranslate(Window src, Window dst, int src_x, int src_y, int *dst_x,
trapped_xerror = 0; trapped_xerror = 0;
return ok; return ok;
#endif /* NO_X11 */
} }
int get_window_size(Window win, int *x, int *y) { int get_window_size(Window win, int *x, int *y) {
...@@ -165,6 +180,9 @@ void snapshot_stack_list(int free_only, double allowed_age) { ...@@ -165,6 +180,9 @@ void snapshot_stack_list(int free_only, double allowed_age) {
last_free = now; last_free = now;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
X_LOCK; X_LOCK;
/* no need to trap error since rootwin */ /* no need to trap error since rootwin */
...@@ -221,6 +239,7 @@ if (0) fprintf(stderr, "blackr: %d %dx%d+%d+%d\n", i, ...@@ -221,6 +239,7 @@ if (0) fprintf(stderr, "blackr: %d %dx%d+%d+%d\n", i,
XFree(list); XFree(list);
X_UNLOCK; X_UNLOCK;
#endif /* NO_X11 */
} }
void update_stack_list(void) { void update_stack_list(void) {
...@@ -271,6 +290,9 @@ Window query_pointer(Window start) { ...@@ -271,6 +290,9 @@ Window query_pointer(Window start) {
int rx, ry, wx, wy; int rx, ry, wx, wy;
unsigned int mask; unsigned int mask;
RAWFB_RET(None) RAWFB_RET(None)
#if NO_X11
return None;
#else
if (start == None) { if (start == None) {
start = rootwin; start = rootwin;
} }
...@@ -279,6 +301,7 @@ Window query_pointer(Window start) { ...@@ -279,6 +301,7 @@ Window query_pointer(Window start) {
} else { } else {
return None; return None;
} }
#endif /* NO_X11 */
} }
unsigned int mask_state(void) { unsigned int mask_state(void) {
...@@ -287,12 +310,16 @@ unsigned int mask_state(void) { ...@@ -287,12 +310,16 @@ unsigned int mask_state(void) {
unsigned int mask; unsigned int mask;
RAWFB_RET(0) RAWFB_RET(0)
#if NO_X11
return 0;
#else
if (XQueryPointer(dpy, rootwin, &r, &c, &rx, &ry, &wx, &wy, &mask)) { if (XQueryPointer(dpy, rootwin, &r, &c, &rx, &ry, &wx, &wy, &mask)) {
return mask; return mask;
} else { } else {
return 0; return 0;
} }
#endif /* NO_X11 */
} }
int pick_windowid(unsigned long *num) { int pick_windowid(unsigned long *num) {
...@@ -381,6 +408,9 @@ Window descend_pointer(int depth, Window start, char *name_info, int len) { ...@@ -381,6 +408,9 @@ Window descend_pointer(int depth, Window start, char *name_info, int len) {
static Window prev_start = None; static Window prev_start = None;
RAWFB_RET(None) RAWFB_RET(None)
#if NO_X11
return None;
#else
if (! classhint) { if (! classhint) {
classhint = XAllocClassHint(); classhint = XAllocClassHint();
...@@ -481,6 +511,7 @@ Window descend_pointer(int depth, Window start, char *name_info, int len) { ...@@ -481,6 +511,7 @@ Window descend_pointer(int depth, Window start, char *name_info, int len) {
} }
return clast; return clast;
#endif /* NO_X11 */
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "July 2006" "x11vnc " "User Commands" .TH X11VNC "1" "July 2006" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.8.3, lastmod: 2006-07-15 version: 0.8.3, lastmod: 2006-07-17
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
......
...@@ -2965,7 +2965,7 @@ int main(int argc, char* argv[]) { ...@@ -2965,7 +2965,7 @@ int main(int argc, char* argv[]) {
} }
overlay_present = 0; overlay_present = 0;
#ifdef SOLARIS_OVERLAY #if defined(SOLARIS_OVERLAY) && !NO_X11
if (! XQueryExtension(dpy, "SUN_OVL", &maj, &ev, &er)) { if (! XQueryExtension(dpy, "SUN_OVL", &maj, &ev, &er)) {
if (! quiet && overlay) { if (! quiet && overlay) {
rfbLog("Disabling -overlay: SUN_OVL " rfbLog("Disabling -overlay: SUN_OVL "
...@@ -2975,7 +2975,7 @@ int main(int argc, char* argv[]) { ...@@ -2975,7 +2975,7 @@ int main(int argc, char* argv[]) {
overlay_present = 1; overlay_present = 1;
} }
#endif #endif
#ifdef IRIX_OVERLAY #if defined(IRIX_OVERLAY) && !NO_X11
if (! XReadDisplayQueryExtension(dpy, &ev, &er)) { if (! XReadDisplayQueryExtension(dpy, &ev, &er)) {
if (! quiet && overlay) { if (! quiet && overlay) {
rfbLog("Disabling -overlay: IRIX ReadDisplay " rfbLog("Disabling -overlay: IRIX ReadDisplay "
......
...@@ -26,18 +26,31 @@ ...@@ -26,18 +26,31 @@
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <rfb/rfb.h>
#include <rfb/rfbregion.h>
/* we can now build under --without-x: */
#if LIBVNCSERVER_HAVE_X11
#define NO_X11 0
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <sys/stat.h> #else
#include <fcntl.h>
#include <ctype.h>
#include <rfb/rfb.h> #define NO_X11 1
#include <rfb/rfbregion.h> #include "nox11.h"
#include <rfb/keysym.h>
#endif
/****************************************************************************/ /****************************************************************************/
...@@ -497,6 +510,8 @@ typedef struct _ClientData { ...@@ -497,6 +510,8 @@ typedef struct _ClientData {
} ClientData; } ClientData;
extern void nox11_exit(int rc);
#include "params.h" #include "params.h"
#include "enums.h" #include "enums.h"
#include "options.h" #include "options.h"
......
...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0; ...@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.8.3 lastmod: 2006-07-15"; char lastmod[] = "0.8.3 lastmod: 2006-07-17";
/* X display info */ /* X display info */
......
...@@ -42,17 +42,24 @@ static void grab_buster_watch(int parent, char *dstr); ...@@ -42,17 +42,24 @@ static void grab_buster_watch(int parent, char *dstr);
void initialize_vnc_connect_prop(void) { void initialize_vnc_connect_prop(void) {
vnc_connect_str[0] = '\0'; vnc_connect_str[0] = '\0';
RAWFB_RET_VOID RAWFB_RET_VOID
#if !NO_X11
vnc_connect_prop = XInternAtom(dpy, "VNC_CONNECT", False); vnc_connect_prop = XInternAtom(dpy, "VNC_CONNECT", False);
#endif
} }
void initialize_x11vnc_remote_prop(void) { void initialize_x11vnc_remote_prop(void) {
x11vnc_remote_str[0] = '\0'; x11vnc_remote_str[0] = '\0';
RAWFB_RET_VOID RAWFB_RET_VOID
#if !NO_X11
x11vnc_remote_prop = XInternAtom(dpy, "X11VNC_REMOTE", False); x11vnc_remote_prop = XInternAtom(dpy, "X11VNC_REMOTE", False);
#endif
} }
void initialize_clipboard_atom(void) { void initialize_clipboard_atom(void) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
clipboard_atom = XInternAtom(dpy, "CLIPBOARD", False); clipboard_atom = XInternAtom(dpy, "CLIPBOARD", False);
if (clipboard_atom == None) { if (clipboard_atom == None) {
if (! quiet) rfbLog("could not find atom CLIPBOARD\n"); if (! quiet) rfbLog("could not find atom CLIPBOARD\n");
...@@ -63,6 +70,7 @@ void initialize_clipboard_atom(void) { ...@@ -63,6 +70,7 @@ void initialize_clipboard_atom(void) {
set_clipboard = 0; set_clipboard = 0;
} }
} }
#endif /* NO_X11 */
} }
static void initialize_xevents(int reset) { static void initialize_xevents(int reset) {
...@@ -76,6 +84,9 @@ static void initialize_xevents(int reset) { ...@@ -76,6 +84,9 @@ static void initialize_xevents(int reset) {
static int did_xrandr = 0; static int did_xrandr = 0;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (reset) { if (reset) {
did_xselect_input = 0; did_xselect_input = 0;
...@@ -136,6 +147,7 @@ static void initialize_xevents(int reset) { ...@@ -136,6 +147,7 @@ static void initialize_xevents(int reset) {
initialize_xdamage(); initialize_xdamage();
did_xdamage = 1; did_xdamage = 1;
} }
#endif /* NO_X11 */
} }
static void print_xevent_bases(void) { static void print_xevent_bases(void) {
...@@ -163,6 +175,9 @@ static void get_prop(char *str, int len, Atom prop) { ...@@ -163,6 +175,9 @@ static void get_prop(char *str, int len, Atom prop) {
return; return;
} }
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
slen = 0; slen = 0;
...@@ -184,6 +199,7 @@ static void get_prop(char *str, int len, Atom prop) { ...@@ -184,6 +199,7 @@ static void get_prop(char *str, int len, Atom prop) {
XFree(data); XFree(data);
} }
} while (bytes_after > 0); } while (bytes_after > 0);
#endif /* NO_X11 */
} }
static void bust_grab(int reset) { static void bust_grab(int reset) {
...@@ -200,6 +216,9 @@ static void bust_grab(int reset) { ...@@ -200,6 +216,9 @@ static void bust_grab(int reset) {
bust_count = 0; bust_count = 0;
return; return;
} }
#if NO_X11
return;
#else
x = 0; x = 0;
y = 0; y = 0;
...@@ -275,6 +294,7 @@ static void bust_grab(int reset) { ...@@ -275,6 +294,7 @@ static void bust_grab(int reset) {
} }
XFlush_wr(dpy); XFlush_wr(dpy);
last_bust = time(NULL); last_bust = time(NULL);
#endif /* NO_X11 */
} }
typedef struct _grabwatch { typedef struct _grabwatch {
...@@ -450,6 +470,9 @@ static void grab_buster_watch(int parent, char *dstr) { ...@@ -450,6 +470,9 @@ static void grab_buster_watch(int parent, char *dstr) {
int db = 0; int db = 0;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (grab_buster > 1) { if (grab_buster > 1) {
db = 1; db = 1;
...@@ -510,6 +533,7 @@ static void grab_buster_watch(int parent, char *dstr) { ...@@ -510,6 +533,7 @@ static void grab_buster_watch(int parent, char *dstr) {
break; break;
} }
} }
#endif /* NO_X11 */
} }
void spawn_grab_buster(void) { void spawn_grab_buster(void) {
...@@ -559,6 +583,9 @@ void sync_tod_with_servertime(void) { ...@@ -559,6 +583,9 @@ void sync_tod_with_servertime(void) {
int i, db = 0; int i, db = 0;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (! ticker_atom) { if (! ticker_atom) {
ticker_atom = XInternAtom(dpy, "X11VNC_TICKER", False); ticker_atom = XInternAtom(dpy, "X11VNC_TICKER", False);
...@@ -601,6 +628,7 @@ void sync_tod_with_servertime(void) { ...@@ -601,6 +628,7 @@ void sync_tod_with_servertime(void) {
} }
usleep(1000); usleep(1000);
} }
#endif /* NO_X11 */
} }
void check_keycode_state(void) { void check_keycode_state(void) {
...@@ -717,6 +745,9 @@ void check_xevents(int reset) { ...@@ -717,6 +745,9 @@ void check_xevents(int reset) {
XErrorHandler old_handler; XErrorHandler old_handler;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (unixpw_in_progress) return; if (unixpw_in_progress) return;
...@@ -1079,6 +1110,7 @@ void check_xevents(int reset) { ...@@ -1079,6 +1110,7 @@ void check_xevents(int reset) {
X_UNLOCK; X_UNLOCK;
last_call = now; last_call = now;
#endif /* NO_X11 */
} }
/* /*
...@@ -1088,6 +1120,9 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) { ...@@ -1088,6 +1120,9 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) {
allowed_input_t input; allowed_input_t input;
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if (unixpw_in_progress) { if (unixpw_in_progress) {
rfbLog("xcut_receive: unixpw_in_progress, skipping.\n"); rfbLog("xcut_receive: unixpw_in_progress, skipping.\n");
...@@ -1169,6 +1204,7 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) { ...@@ -1169,6 +1204,7 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) {
X_UNLOCK; X_UNLOCK;
set_cutbuffer = 1; set_cutbuffer = 1;
#endif /* NO_X11 */
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "keyboard.h" #include "keyboard.h"
#include "xevents.h" #include "xevents.h"
#include "connections.h" #include "connections.h"
#include "cleanup.h"
int xshm_present = 0; int xshm_present = 0;
int xtest_present = 0; int xtest_present = 0;
...@@ -103,11 +104,15 @@ int guess_bits_per_color(int bits_per_pixel) { ...@@ -103,11 +104,15 @@ int guess_bits_per_color(int bits_per_pixel) {
} }
int XFlush_wr(Display *disp) { int XFlush_wr(Display *disp) {
#if NO_X11
return 1;
#else
if (disp) { if (disp) {
return XFlush(disp); return XFlush(disp);
} else { } else {
return 1; return 1;
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -184,6 +189,10 @@ Bool XShmQueryExtension_wr(Display *disp) { ...@@ -184,6 +189,10 @@ Bool XShmQueryExtension_wr(Display *disp) {
XImage *xreadscreen(Display *disp, Drawable d, int x, int y, XImage *xreadscreen(Display *disp, Drawable d, int x, int y,
unsigned int width, unsigned int height, Bool show_cursor) { unsigned int width, unsigned int height, Bool show_cursor) {
#if NO_X11
return NULL;
#else
#ifdef SOLARIS_OVERLAY #ifdef SOLARIS_OVERLAY
return XReadScreen(disp, d, x, y, width, height, return XReadScreen(disp, d, x, y, width, height,
show_cursor); show_cursor);
...@@ -201,12 +210,17 @@ XImage *xreadscreen(Display *disp, Drawable d, int x, int y, ...@@ -201,12 +210,17 @@ XImage *xreadscreen(Display *disp, Drawable d, int x, int y,
return NULL; return NULL;
# endif # endif
#endif #endif
#endif /* NO_X11 */
} }
XImage *XGetSubImage_wr(Display *disp, Drawable d, int x, int y, XImage *XGetSubImage_wr(Display *disp, Drawable d, int x, int y,
unsigned int width, unsigned int height, unsigned long plane_mask, unsigned int width, unsigned int height, unsigned long plane_mask,
int format, XImage *dest_image, int dest_x, int dest_y) { int format, XImage *dest_image, int dest_x, int dest_y) {
#if NO_X11
nox11_exit(1);
return NULL;
#else
ADJUST_ROOTSHIFT ADJUST_ROOTSHIFT
if (overlay && dest_x == 0 && dest_y == 0) { if (overlay && dest_x == 0 && dest_y == 0) {
...@@ -231,11 +245,16 @@ XImage *XGetSubImage_wr(Display *disp, Drawable d, int x, int y, ...@@ -231,11 +245,16 @@ XImage *XGetSubImage_wr(Display *disp, Drawable d, int x, int y,
} }
return XGetSubImage(disp, d, x, y, width, height, plane_mask, return XGetSubImage(disp, d, x, y, width, height, plane_mask,
format, dest_image, dest_x, dest_y); format, dest_image, dest_x, dest_y);
#endif /* NO_X11 */
} }
XImage *XGetImage_wr(Display *disp, Drawable d, int x, int y, XImage *XGetImage_wr(Display *disp, Drawable d, int x, int y,
unsigned int width, unsigned int height, unsigned long plane_mask, unsigned int width, unsigned int height, unsigned long plane_mask,
int format) { int format) {
#if NO_X11
nox11_exit(1);
return NULL;
#else
ADJUST_ROOTSHIFT ADJUST_ROOTSHIFT
...@@ -244,6 +263,7 @@ XImage *XGetImage_wr(Display *disp, Drawable d, int x, int y, ...@@ -244,6 +263,7 @@ XImage *XGetImage_wr(Display *disp, Drawable d, int x, int y,
(Bool) overlay_cursor); (Bool) overlay_cursor);
} }
return XGetImage(disp, d, x, y, width, height, plane_mask, format); return XGetImage(disp, d, x, y, width, height, plane_mask, format);
#endif /* NO_X11 */
} }
XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth, XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth,
...@@ -275,6 +295,10 @@ XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth, ...@@ -275,6 +295,10 @@ XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth,
return xi; return xi;
} }
#if NO_X11
nox11_exit(1);
return NULL;
#else
if (overlay) { if (overlay) {
XImage *xi; XImage *xi;
xi = xreadscreen(disp, window, 0, 0, width, height, False); xi = xreadscreen(disp, window, 0, 0, width, height, False);
...@@ -290,6 +314,7 @@ XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth, ...@@ -290,6 +314,7 @@ XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth,
return XCreateImage(disp, visual, depth, format, offset, data, return XCreateImage(disp, visual, depth, format, offset, data,
width, height, bitmap_pad, bytes_per_line); width, height, bitmap_pad, bytes_per_line);
#endif /* NO_X11 */
} }
static void copy_raw_fb_24_to_32(XImage *dest, int x, int y, unsigned int w, static void copy_raw_fb_24_to_32(XImage *dest, int x, int y, unsigned int w,
...@@ -545,12 +570,15 @@ void init_track_keycode_state(void) { ...@@ -545,12 +570,15 @@ void init_track_keycode_state(void) {
static void upup_downdown_warning(KeyCode key, Bool down) { static void upup_downdown_warning(KeyCode key, Bool down) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
return;
#else
if ((down ? 1:0) == keycode_state[(int) key]) { if ((down ? 1:0) == keycode_state[(int) key]) {
char *str = XKeysymToString(XKeycodeToKeysym(dpy, key, 0)); char *str = XKeysymToString(XKeycodeToKeysym(dpy, key, 0));
rfbLog("XTestFakeKeyEvent: keycode=0x%x \"%s\" is *already* " rfbLog("XTestFakeKeyEvent: keycode=0x%x \"%s\" is *already* "
"%s\n", key, str ? str : "null", down ? "down":"up"); "%s\n", key, str ? str : "null", down ? "down":"up");
} }
#endif /* NO_X11 */
} }
/* /*
...@@ -562,6 +590,10 @@ void XTRAP_FakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, ...@@ -562,6 +590,10 @@ void XTRAP_FakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down,
unsigned long delay) { unsigned long delay) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
nox11_exit(1);
return;
#else
if (! xtrap_present) { if (! xtrap_present) {
DEBUG_SKIPPED_INPUT(debug_keyboard, "keyboard: no-XTRAP"); DEBUG_SKIPPED_INPUT(debug_keyboard, "keyboard: no-XTRAP");
...@@ -580,6 +612,8 @@ void XTRAP_FakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, ...@@ -580,6 +612,8 @@ void XTRAP_FakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down,
#else #else
DEBUG_SKIPPED_INPUT(debug_keyboard, "keyboard: no-XTRAP-build"); DEBUG_SKIPPED_INPUT(debug_keyboard, "keyboard: no-XTRAP-build");
#endif #endif
#endif /* NO_X11 */
} }
void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down,
...@@ -588,6 +622,10 @@ void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, ...@@ -588,6 +622,10 @@ void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down,
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
nox11_exit(1);
return;
#else
if (debug_keyboard) { if (debug_keyboard) {
char *str = XKeysymToString(XKeycodeToKeysym(dpy, key, 0)); char *str = XKeysymToString(XKeycodeToKeysym(dpy, key, 0));
rfbLog("XTestFakeKeyEvent(dpy, keycode=0x%x \"%s\", %s)\n", rfbLog("XTestFakeKeyEvent(dpy, keycode=0x%x \"%s\", %s)\n",
...@@ -633,12 +671,18 @@ void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, ...@@ -633,12 +671,18 @@ void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down,
} }
keycode_state[(int) key] = down ? 1 : 0; keycode_state[(int) key] = down ? 1 : 0;
#endif #endif
#endif /* NO_X11 */
} }
void XTRAP_FakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press, void XTRAP_FakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press,
unsigned long delay) { unsigned long delay) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
nox11_exit(1);
return;
#else
if (! xtrap_present) { if (! xtrap_present) {
DEBUG_SKIPPED_INPUT(debug_keyboard, "button: no-XTRAP"); DEBUG_SKIPPED_INPUT(debug_keyboard, "button: no-XTRAP");
...@@ -653,12 +697,18 @@ void XTRAP_FakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press, ...@@ -653,12 +697,18 @@ void XTRAP_FakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press,
#else #else
DEBUG_SKIPPED_INPUT(debug_keyboard, "button: no-XTRAP-build"); DEBUG_SKIPPED_INPUT(debug_keyboard, "button: no-XTRAP-build");
#endif #endif
#endif /* NO_X11 */
} }
void XTestFakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press, void XTestFakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press,
unsigned long delay) { unsigned long delay) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
nox11_exit(1);
return;
#else
if (grab_ptr) { if (grab_ptr) {
XUngrabPointer(dpy, CurrentTime); XUngrabPointer(dpy, CurrentTime);
...@@ -686,6 +736,7 @@ void XTestFakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press, ...@@ -686,6 +736,7 @@ void XTestFakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press,
if (grab_ptr) { if (grab_ptr) {
adjust_grabs(1, 1); adjust_grabs(1, 1);
} }
#endif /* NO_X11 */
} }
void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y, void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y,
...@@ -693,6 +744,10 @@ void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y, ...@@ -693,6 +744,10 @@ void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y,
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
nox11_exit(1);
return;
#else
if (! xtrap_present) { if (! xtrap_present) {
DEBUG_SKIPPED_INPUT(debug_keyboard, "motion: no-XTRAP"); DEBUG_SKIPPED_INPUT(debug_keyboard, "motion: no-XTRAP");
return; return;
...@@ -705,12 +760,18 @@ void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y, ...@@ -705,12 +760,18 @@ void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y,
#else #else
DEBUG_SKIPPED_INPUT(debug_keyboard, "motion: no-XTRAP-build"); DEBUG_SKIPPED_INPUT(debug_keyboard, "motion: no-XTRAP-build");
#endif #endif
#endif /* NO_X11 */
} }
void XTestFakeMotionEvent_wr(Display* dpy, int screen, int x, int y, void XTestFakeMotionEvent_wr(Display* dpy, int screen, int x, int y,
unsigned long delay) { unsigned long delay) {
RAWFB_RET_VOID RAWFB_RET_VOID
#if NO_X11
nox11_exit(1);
return;
#else
if (grab_ptr) { if (grab_ptr) {
XUngrabPointer(dpy, CurrentTime); XUngrabPointer(dpy, CurrentTime);
...@@ -734,6 +795,7 @@ void XTestFakeMotionEvent_wr(Display* dpy, int screen, int x, int y, ...@@ -734,6 +795,7 @@ void XTestFakeMotionEvent_wr(Display* dpy, int screen, int x, int y,
if (grab_ptr) { if (grab_ptr) {
adjust_grabs(1, 1); adjust_grabs(1, 1);
} }
#endif /* NO_X11 */
} }
Bool XTestCompareCurrentCursorWithWindow_wr(Display* dpy, Window w) { Bool XTestCompareCurrentCursorWithWindow_wr(Display* dpy, Window w) {
...@@ -971,6 +1033,10 @@ Display *XOpenDisplay_wr(char *display_name) { ...@@ -971,6 +1033,10 @@ Display *XOpenDisplay_wr(char *display_name) {
if (! xauth_raw(1)) { if (! xauth_raw(1)) {
return NULL; return NULL;
} }
#if NO_X11
rfbLog("This x11vnc was built without X11 support (-rawfb only).\n");
return NULL;
#else
d = XOpenDisplay(display_name); d = XOpenDisplay(display_name);
if (db) fprintf(stderr, "XOpenDisplay_wr: %s %p\n", display_name, (void *)d); if (db) fprintf(stderr, "XOpenDisplay_wr: %s %p\n", display_name, (void *)d);
...@@ -978,11 +1044,29 @@ Display *XOpenDisplay_wr(char *display_name) { ...@@ -978,11 +1044,29 @@ Display *XOpenDisplay_wr(char *display_name) {
xauth_raw(0); xauth_raw(0);
return d; return d;
#endif /* NO_X11 */
} }
int XCloseDisplay_wr(Display *display) { int XCloseDisplay_wr(Display *display) {
int db = 0; int db = 0;
if (db) fprintf(stderr, "XCloseDisplay_wr: %p\n", (void *)display); if (db) fprintf(stderr, "XCloseDisplay_wr: %p\n", (void *)display);
#if NO_X11
return 0;
#else
return XCloseDisplay(display); return XCloseDisplay(display);
#endif /* NO_X11 */
}
void nox11_exit(int rc) {
#if NO_X11
rfbLog("This x11vnc was not built with X11 support.\n");
clean_up_exit(rc);
#else
if (0) {rc = 0;}
#endif
} }
#if NO_X11
#include "nox11_funcs.h"
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment