Commit 94b092cd authored by runge's avatar runge

x11vnc: -8to24 more speedups; tunables for very slow machines.

parent d0ef1285
This diff is collapsed.
2006-02-06 Karl Runge <runge@karlrunge.com>
* x11vnc: -8to24 more speedups; tunables for very slow machines.
2006-02-04 Karl Runge <runge@karlrunge.com> 2006-02-04 Karl Runge <runge@karlrunge.com>
* x11vnc: -8to24 speedups and improvements. * x11vnc: -8to24 speedups and improvements.
......
x11vnc README file Date: Sat Feb 4 22:21:00 EST 2006 x11vnc README file Date: Mon Feb 6 00:16:18 EST 2006
The following information is taken from these URLs: The following information is taken from these URLs:
...@@ -4898,7 +4898,7 @@ x11vnc: a VNC server for real X displays ...@@ -4898,7 +4898,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options: Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions) % x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-02-04 x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-02-06
x11vnc options: x11vnc options:
-display disp -auth file -display disp -auth file
...@@ -5009,7 +5009,7 @@ libvncserver-tight-extension options: ...@@ -5009,7 +5009,7 @@ libvncserver-tight-extension options:
% x11vnc -help % x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-02-04 x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-02-06
Typical usage is: Typical usage is:
...@@ -5201,6 +5201,18 @@ Options: ...@@ -5201,6 +5201,18 @@ Options:
"poll=t" where "t" is a floating point time. "poll=t" where "t" is a floating point time.
(default: 0.05) (default: 0.05)
Setting the option "level2" will limit the search
for non-default visual windows to two levels from the
root window. Do this on slow machines where you know
the window manager only imposes one extra window between
the app window and the root window.
Also for very slow machines use "cachewin=t"
where t is a floating point amount of time to cache
XGetWindowAttributes results. E.g. cachewin=5.0.
This may lead to the windows being unnoticed for this
amount of time when deiconifying, painting errors, etc.
Debugging for this mode can be enabled by setting Debugging for this mode can be enabled by setting
"dbg=1", "dbg=2", or "dbg=3". "dbg=1", "dbg=2", or "dbg=3".
......
...@@ -209,6 +209,18 @@ void print_help(int mode) { ...@@ -209,6 +209,18 @@ void print_help(int mode) {
" \"poll=t\" where \"t\" is a floating point time.\n" " \"poll=t\" where \"t\" is a floating point time.\n"
" (default: %.2f)\n" " (default: %.2f)\n"
"\n" "\n"
" Setting the option \"level2\" will limit the search\n"
" for non-default visual windows to two levels from the\n"
" root window. Do this on slow machines where you know\n"
" the window manager only imposes one extra window between\n"
" the app window and the root window.\n"
"\n"
" Also for very slow machines use \"cachewin=t\"\n"
" where t is a floating point amount of time to cache\n"
" XGetWindowAttributes results. E.g. cachewin=5.0.\n"
" This may lead to the windows being unnoticed for this\n"
" amount of time when deiconifying, painting errors, etc.\n"
"\n"
" Debugging for this mode can be enabled by setting \n" " Debugging for this mode can be enabled by setting \n"
" \"dbg=1\", \"dbg=2\", or \"dbg=3\".\n" " \"dbg=1\", \"dbg=2\", or \"dbg=3\".\n"
"\n" "\n"
......
...@@ -25,15 +25,25 @@ Window descend_pointer(int depth, Window start, char *name_info, int len); ...@@ -25,15 +25,25 @@ Window descend_pointer(int depth, Window start, char *name_info, int len);
Window parent_window(Window win, char **name) { Window parent_window(Window win, char **name) {
Window r, parent; Window r, parent;
Window *list; Window *list;
XErrorHandler old_handler;
unsigned int nchild; unsigned int nchild;
int rc;
if (name != NULL) { if (name != NULL) {
*name = NULL; *name = NULL;
} }
if (! XQueryTree(dpy, win, &r, &parent, &list, &nchild)) { old_handler = XSetErrorHandler(trap_xerror);
trapped_xerror = 0;
rc = XQueryTree(dpy, win, &r, &parent, &list, &nchild);
XSetErrorHandler(old_handler);
if (! rc || trapped_xerror) {
trapped_xerror = 0;
return None; return None;
} }
trapped_xerror = 0;
if (list) { if (list) {
XFree(list); XFree(list);
} }
...@@ -59,8 +69,8 @@ int valid_window(Window win, XWindowAttributes *attr_ret, int bequiet) { ...@@ -59,8 +69,8 @@ int valid_window(Window win, XWindowAttributes *attr_ret, int bequiet) {
return 0; return 0;
} }
trapped_xerror = 0;
old_handler = XSetErrorHandler(trap_xerror); old_handler = XSetErrorHandler(trap_xerror);
trapped_xerror = 0;
if (XGetWindowAttributes(dpy, win, pattr)) { if (XGetWindowAttributes(dpy, win, pattr)) {
ok = 1; ok = 1;
} }
...@@ -148,6 +158,7 @@ void snapshot_stack_list(int free_only, double allowed_age) { ...@@ -148,6 +158,7 @@ void snapshot_stack_list(int free_only, double allowed_age) {
last_free = now; last_free = now;
X_LOCK; X_LOCK;
/* no need to trap error since rootwin */
rc = XQueryTree(dpy, rootwin, &r, &w, &list, &ui); rc = XQueryTree(dpy, rootwin, &r, &w, &list, &ui);
num = (int) ui; num = (int) ui;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "February 2006" "x11vnc " "User Commands" .TH X11VNC "1" "February 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, lastmod: 2006-02-04 version: 0.8, lastmod: 2006-02-06
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
...@@ -241,6 +241,18 @@ non-default visual regions for changes, use the option ...@@ -241,6 +241,18 @@ non-default visual regions for changes, use the option
"poll=t" where "t" is a floating point time. "poll=t" where "t" is a floating point time.
(default: 0.05) (default: 0.05)
.IP .IP
Setting the option "level2" will limit the search
for non-default visual windows to two levels from the
root window. Do this on slow machines where you know
the window manager only imposes one extra window between
the app window and the root window.
.IP
Also for very slow machines use "cachewin=t"
where t is a floating point amount of time to cache
XGetWindowAttributes results. E.g. cachewin=5.0.
This may lead to the windows being unnoticed for this
amount of time when deiconifying, painting errors, etc.
.IP
Debugging for this mode can be enabled by setting Debugging for this mode can be enabled by setting
"dbg=1", "dbg=2", or "dbg=3". "dbg=1", "dbg=2", or "dbg=3".
.PP .PP
......
...@@ -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 lastmod: 2006-02-04"; char lastmod[] = "0.8 lastmod: 2006-02-06";
/* X display info */ /* X display info */
......
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