Commit 399a175f authored by runge's avatar runge

x11vnc: make -xwarppointer the default if xinerama is active.

parent afc931f1
2006-12-17 Karl Runge <runge@karlrunge.com>
* x11vnc: make -xwarppointer the default if xinerama is active.
2006-12-09 Karl Runge <runge@karlrunge.com>
* java SSL viewer: guard against empty urlPrefix
* x11vnc: FINDCREATEDISPLAY support to create X session if
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1564,9 +1564,10 @@ void print_help(int mode) {
" areas to black out (if your system has libXinerama).\n"
" default: %s\n"
"\n"
" In general, we have noticed on XINERAMA displays you\n"
" may need to use the \"-xwarppointer\" option if the mouse\n"
" pointer misbehaves.\n"
" In general, we have noticed on XINERAMA displays you may\n"
" need to use the \"-xwarppointer\" option if the mouse\n"
" pointer misbehaves and it is enabled by default. Use\n"
" \"-noxwarppointer\" if you do not want this.\n"
"\n"
"-xtrap Use the DEC-XTRAP extension for keystroke and mouse\n"
" input insertion. For use on legacy systems, e.g. X11R5,\n"
......@@ -1976,10 +1977,13 @@ void print_help(int mode) {
" CursorPosUpdates extension. Other clients will be able\n"
" to see the pointer motions. Default: %s\n"
"-xwarppointer Move the pointer with XWarpPointer(3X) instead of\n"
" the XTEST extension. Use this as a workaround\n"
"-noxwarppointer the XTEST extension. Use this as a workaround\n"
" if the pointer motion behaves incorrectly, e.g.\n"
" on touchscreens or other non-standard setups.\n"
" Also sometimes needed on XINERAMA displays.\n"
"\n"
" It is also sometimes needed on XINERAMA displays and is\n"
" enabled by default if XINERAMA is found to be active.\n"
" To prevent this, use -noxwarppointer.\n"
"\n"
"-buttonmap string String to remap mouse buttons. Format: IJK-LMN, this\n"
" maps buttons I -> L, etc., e.g. -buttonmap 13-31\n"
......
......@@ -355,6 +355,7 @@ int use_threads = 0;
#endif
/* info about command line opts */
int got_noxwarppointer = 0;
int got_rfbport = 0;
int got_rfbport_val = -1;
int got_alwaysshared = 0;
......
......@@ -266,6 +266,7 @@ extern int verbose;
extern int use_threads;
extern int got_noxwarppointer;
extern int got_rfbport;
extern int got_rfbport_val;
extern int got_alwaysshared;
......
......@@ -2,7 +2,7 @@
.TH X11VNC "1" "December 2006" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.8.4, lastmod: 2006-12-11
version: 0.8.4, lastmod: 2006-12-14
.SH SYNOPSIS
.B x11vnc
[OPTION]...
......@@ -1794,9 +1794,10 @@ not a rectangle this option will try to guess the
areas to black out (if your system has libXinerama).
default: \fB-xinerama\fR
.IP
In general, we have noticed on XINERAMA displays you
may need to use the "\fB-xwarppointer\fR" option if the mouse
pointer misbehaves.
In general, we have noticed on XINERAMA displays you may
need to use the "\fB-xwarppointer\fR" option if the mouse
pointer misbehaves and it is enabled by default. Use
"\fB-noxwarppointer\fR" if you do not want this.
.PP
\fB-xtrap\fR
.IP
......@@ -2325,7 +2326,7 @@ back to all vnc clients that support the TightVNC
CursorPosUpdates extension. Other clients will be able
to see the pointer motions. Default: \fB-cursorpos\fR
.PP
\fB-xwarppointer\fR
\fB-xwarppointer,\fR \fB-noxwarppointer\fR
.IP
Move the pointer with
.IR XWarpPointer (3X)
......@@ -2333,7 +2334,10 @@ instead of
the XTEST extension. Use this as a workaround
if the pointer motion behaves incorrectly, e.g.
on touchscreens or other non-standard setups.
Also sometimes needed on XINERAMA displays.
.IP
It is also sometimes needed on XINERAMA displays and is
enabled by default if XINERAMA is found to be active.
To prevent this, use \fB-noxwarppointer.\fR
.PP
\fB-buttonmap\fR \fIstring\fR
.IP
......
......@@ -2097,6 +2097,9 @@ int main(int argc, char* argv[]) {
cursor_pos_updates = 0;
} else if (!strcmp(arg, "-xwarppointer")) {
use_xwarppointer = 1;
} else if (!strcmp(arg, "-noxwarppointer")) {
use_xwarppointer = 0;
got_noxwarppointer = 1;
} else if (!strcmp(arg, "-buttonmap")) {
CHECK_ARGC
pointer_remap = strdup(argv[++i]);
......
......@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.8.4 lastmod: 2006-12-11";
char lastmod[] = "0.8.4 lastmod: 2006-12-14";
/* X display info */
......
......@@ -260,6 +260,15 @@ static void initialize_xinerama (void) {
return;
}
xinerama_present = 1;
rfbLog("\n");
rfbLog("Xinerama is present and active (e.g. multi-head).\n");
if (! use_xwarppointer && ! got_noxwarppointer) {
rfbLog("Xinerama: enabling -xwarppointer mode to try to correct\n");
rfbLog("Xinerama: mouse pointer motion. XTEST+XINERAMA bug.\n");
rfbLog("Xinerama: Use -noxwarppointer to force XTEST.\n");
use_xwarppointer = 1;
}
/* n.b. change to XineramaGetData() someday */
xineramas = XineramaQueryScreens(dpy, &n);
......@@ -271,6 +280,7 @@ static void initialize_xinerama (void) {
if (verbose) {
rfbLog("Xinerama: no blackouts needed (only one"
" sub-screen)\n");
rfbLog("\n");
}
XFree_wr(xineramas);
return; /* must be OK w/o change */
......@@ -298,6 +308,7 @@ static void initialize_xinerama (void) {
if (sraRgnEmpty(black_region)) {
rfbLog("Xinerama: no blackouts needed (screen fills"
" rectangle)\n");
rfbLog("\n");
sraRgnDestroy(black_region);
return;
}
......@@ -332,6 +343,7 @@ static void initialize_xinerama (void) {
}
sraRgnReleaseIterator(iter);
initialize_blackouts(bstr);
rfbLog("\n");
free(bstr);
free(tstr);
......
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