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

pull/1/head
runge 18 years ago
parent afc931f15d
commit 399a175f0b

@ -1,3 +1,6 @@
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> 2006-12-09 Karl Runge <runge@karlrunge.com>
* java SSL viewer: guard against empty urlPrefix * java SSL viewer: guard against empty urlPrefix
* x11vnc: FINDCREATEDISPLAY support to create X session if * x11vnc: FINDCREATEDISPLAY support to create X session if

File diff suppressed because it is too large Load Diff

@ -1564,9 +1564,10 @@ void print_help(int mode) {
" areas to black out (if your system has libXinerama).\n" " areas to black out (if your system has libXinerama).\n"
" default: %s\n" " default: %s\n"
"\n" "\n"
" In general, we have noticed on XINERAMA displays you\n" " In general, we have noticed on XINERAMA displays you may\n"
" may need to use the \"-xwarppointer\" option if the mouse\n" " need to use the \"-xwarppointer\" option if the mouse\n"
" pointer misbehaves.\n" " pointer misbehaves and it is enabled by default. Use\n"
" \"-noxwarppointer\" if you do not want this.\n"
"\n" "\n"
"-xtrap Use the DEC-XTRAP extension for keystroke and mouse\n" "-xtrap Use the DEC-XTRAP extension for keystroke and mouse\n"
" input insertion. For use on legacy systems, e.g. X11R5,\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" " CursorPosUpdates extension. Other clients will be able\n"
" to see the pointer motions. Default: %s\n" " to see the pointer motions. Default: %s\n"
"-xwarppointer Move the pointer with XWarpPointer(3X) instead of\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" " if the pointer motion behaves incorrectly, e.g.\n"
" on touchscreens or other non-standard setups.\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" "\n"
"-buttonmap string String to remap mouse buttons. Format: IJK-LMN, this\n" "-buttonmap string String to remap mouse buttons. Format: IJK-LMN, this\n"
" maps buttons I -> L, etc., e.g. -buttonmap 13-31\n" " maps buttons I -> L, etc., e.g. -buttonmap 13-31\n"

@ -355,6 +355,7 @@ int use_threads = 0;
#endif #endif
/* info about command line opts */ /* info about command line opts */
int got_noxwarppointer = 0;
int got_rfbport = 0; int got_rfbport = 0;
int got_rfbport_val = -1; int got_rfbport_val = -1;
int got_alwaysshared = 0; int got_alwaysshared = 0;

@ -266,6 +266,7 @@ extern int verbose;
extern int use_threads; extern int use_threads;
extern int got_noxwarppointer;
extern int got_rfbport; extern int got_rfbport;
extern int got_rfbport_val; extern int got_rfbport_val;
extern int got_alwaysshared; extern int got_alwaysshared;

@ -2,7 +2,7 @@
.TH X11VNC "1" "December 2006" "x11vnc " "User Commands" .TH X11VNC "1" "December 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.4, lastmod: 2006-12-11 version: 0.8.4, lastmod: 2006-12-14
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
@ -1794,9 +1794,10 @@ not a rectangle this option will try to guess the
areas to black out (if your system has libXinerama). areas to black out (if your system has libXinerama).
default: \fB-xinerama\fR default: \fB-xinerama\fR
.IP .IP
In general, we have noticed on XINERAMA displays you In general, we have noticed on XINERAMA displays you may
may need to use the "\fB-xwarppointer\fR" option if the mouse need to use the "\fB-xwarppointer\fR" option if the mouse
pointer misbehaves. pointer misbehaves and it is enabled by default. Use
"\fB-noxwarppointer\fR" if you do not want this.
.PP .PP
\fB-xtrap\fR \fB-xtrap\fR
.IP .IP
@ -2325,7 +2326,7 @@ back to all vnc clients that support the TightVNC
CursorPosUpdates extension. Other clients will be able CursorPosUpdates extension. Other clients will be able
to see the pointer motions. Default: \fB-cursorpos\fR to see the pointer motions. Default: \fB-cursorpos\fR
.PP .PP
\fB-xwarppointer\fR \fB-xwarppointer,\fR \fB-noxwarppointer\fR
.IP .IP
Move the pointer with Move the pointer with
.IR XWarpPointer (3X) .IR XWarpPointer (3X)
@ -2333,7 +2334,10 @@ instead of
the XTEST extension. Use this as a workaround the XTEST extension. Use this as a workaround
if the pointer motion behaves incorrectly, e.g. if the pointer motion behaves incorrectly, e.g.
on touchscreens or other non-standard setups. 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 .PP
\fB-buttonmap\fR \fIstring\fR \fB-buttonmap\fR \fIstring\fR
.IP .IP

@ -2097,6 +2097,9 @@ int main(int argc, char* argv[]) {
cursor_pos_updates = 0; cursor_pos_updates = 0;
} else if (!strcmp(arg, "-xwarppointer")) { } else if (!strcmp(arg, "-xwarppointer")) {
use_xwarppointer = 1; use_xwarppointer = 1;
} else if (!strcmp(arg, "-noxwarppointer")) {
use_xwarppointer = 0;
got_noxwarppointer = 1;
} else if (!strcmp(arg, "-buttonmap")) { } else if (!strcmp(arg, "-buttonmap")) {
CHECK_ARGC CHECK_ARGC
pointer_remap = strdup(argv[++i]); pointer_remap = strdup(argv[++i]);

@ -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.4 lastmod: 2006-12-11"; char lastmod[] = "0.8.4 lastmod: 2006-12-14";
/* X display info */ /* X display info */

@ -260,6 +260,15 @@ static void initialize_xinerama (void) {
return; return;
} }
xinerama_present = 1; 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 */ /* n.b. change to XineramaGetData() someday */
xineramas = XineramaQueryScreens(dpy, &n); xineramas = XineramaQueryScreens(dpy, &n);
@ -271,6 +280,7 @@ static void initialize_xinerama (void) {
if (verbose) { if (verbose) {
rfbLog("Xinerama: no blackouts needed (only one" rfbLog("Xinerama: no blackouts needed (only one"
" sub-screen)\n"); " sub-screen)\n");
rfbLog("\n");
} }
XFree_wr(xineramas); XFree_wr(xineramas);
return; /* must be OK w/o change */ return; /* must be OK w/o change */
@ -298,6 +308,7 @@ static void initialize_xinerama (void) {
if (sraRgnEmpty(black_region)) { if (sraRgnEmpty(black_region)) {
rfbLog("Xinerama: no blackouts needed (screen fills" rfbLog("Xinerama: no blackouts needed (screen fills"
" rectangle)\n"); " rectangle)\n");
rfbLog("\n");
sraRgnDestroy(black_region); sraRgnDestroy(black_region);
return; return;
} }
@ -332,6 +343,7 @@ static void initialize_xinerama (void) {
} }
sraRgnReleaseIterator(iter); sraRgnReleaseIterator(iter);
initialize_blackouts(bstr); initialize_blackouts(bstr);
rfbLog("\n");
free(bstr); free(bstr);
free(tstr); free(tstr);

Loading…
Cancel
Save