x11vnc: more -ncache improvements.

pull/1/head
runge 18 years ago
parent 833f06025f
commit c88d830f55

@ -1,3 +1,6 @@
2007-01-01 Karl Runge <runge@karlrunge.com>
* x11vnc: more -ncache improvements.
2006-12-28 Karl Runge <runge@karlrunge.com>
* x11vnc: more work on -ncache, add macosx support, fix X errors
and improve cache expiration algorithm.

@ -1,5 +1,5 @@
x11vnc README file Date: Fri Dec 29 01:37:39 EST 2006
x11vnc README file Date: Mon Jan 1 21:04:46 EST 2007
The following information is taken from these URLs:
@ -9262,7 +9262,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.8.4 lastmod: 2006-12-29
x11vnc: allow VNC connections to real X11 displays. 0.8.4 lastmod: 2007-01-01
x11vnc options:
-display disp -auth file -id windowid
@ -9308,34 +9308,34 @@ x11vnc options:
-noalphablend -nocursorshape -cursorpos
-nocursorpos -xwarppointer -noxwarppointer
-buttonmap string -nodragging -ncache n
-ncache_cr -ncache_pad n -wireframe [str]
-nowireframe -nowireframelocal -wirecopyrect mode
-nowirecopyrect -debug_wireframe -scrollcopyrect mode
-noscrollcopyrect -scr_area n -scr_skip list
-scr_inc list -scr_keys list -scr_term list
-scr_keyrepeat lo-hi -scr_parms string -fixscreen string
-debug_scroll -noxrecord -grab_buster
-nograb_buster -debug_grabs -debug_sel
-pointer_mode n -input_skip n -allinput
-speeds rd,bw,lat -wmdt string -debug_pointer
-debug_keyboard -defer time -wait time
-wait_ui factor -nowait_bog -slow_fb time
-readtimeout n -nap -nonap
-sb time -nofbpm -fbpm
-nodpms -dpms -noxdamage
-xd_area A -xd_mem f -sigpipe string
-threads -nothreads -fs f
-gaps n -grow n -fuzz n
-debug_tiles -snapfb -rawfb string
-freqtab file -pipeinput cmd -macnodim
-macnosleep -macnosaver -macnowait
-macwheel n -macnoswap -macnoresize
-maciconanim n -macmenu -gui [gui-opts]
-remote command -query variable -QD variable
-sync -noremote -yesremote
-unsafe -safer -privremote
-nocmds -allowedcmds list -deny_all
-ncache_cr -ncache_no_moveraise -ncache_no_dtchange
-ncache_pad n -wireframe [str] -nowireframe
-nowireframelocal -wirecopyrect mode -nowirecopyrect
-debug_wireframe -scrollcopyrect mode -noscrollcopyrect
-scr_area n -scr_skip list -scr_inc list
-scr_keys list -scr_term list -scr_keyrepeat lo-hi
-scr_parms string -fixscreen string -debug_scroll
-noxrecord -grab_buster -nograb_buster
-debug_grabs -debug_sel -pointer_mode n
-input_skip n -allinput -speeds rd,bw,lat
-wmdt string -debug_pointer -debug_keyboard
-defer time -wait time -wait_ui factor
-nowait_bog -slow_fb time -readtimeout n
-nap -nonap -sb time
-nofbpm -fbpm -nodpms
-dpms -noxdamage -xd_area A
-xd_mem f -sigpipe string -threads
-nothreads -fs f -gaps n
-grow n -fuzz n -debug_tiles
-snapfb -rawfb string -freqtab file
-pipeinput cmd -macnodim -macnosleep
-macnosaver -macnowait -macwheel n
-macnoswap -macnoresize -maciconanim n
-macmenu -gui [gui-opts] -remote command
-query variable -QD variable -sync
-noremote -yesremote -unsafe
-safer -privremote -nocmds
-allowedcmds list -deny_all
libvncserver options:
-rfbport port TCP port for RFB protocol
@ -9369,7 +9369,7 @@ libvncserver-tight-extension options:
% x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.8.4 lastmod: 2006-12-29
x11vnc: allow VNC connections to real X11 displays. 0.8.4 lastmod: 2007-01-01
(type "x11vnc -opts" to just list the options.)
@ -11388,7 +11388,7 @@ Options:
better results than the 'Genie' one. Also, window event
detection not as accurate as the X version.
-ncache_cr In -nache mode, try do to copyrect opaque window
-ncache_cr In -ncache mode, try to do copyrect opaque window
moves/drags instead of wireframes (this can induce
painting errors). The wireframe will still be used when
moving a window whose save-unders has not yet been set
@ -11399,7 +11399,18 @@ Options:
smoother drags than tightvnc viewer. Response may also
be choppy if the server side machine is too slow.
-ncache_pad n In -nache mode, pad each window with n pixels for the
-ncache_no_moveraise In -ncache mode, do not assume that moving a window
will cause the window manager to raise it to the top
of the stack. The default is to assume it does, and
so at the beginning of any wireframe, etc, window moves
the window will be pushed to top in the VNC viewer.
-ncache_no_dtchange In -ncache mode, do not try to guess when the desktop
(viewport) changes to another one (i.e. another
workarea). The default is to try to guess and when
detected try to make the transistion more smoothly.
-ncache_pad n In -ncache mode, pad each window with n pixels for the
caching rectangles. This can be used to try to improve
the situation with dropshadows or other compositing
(e.g. MacOS X window manager), although it could make
@ -12656,6 +12667,8 @@ n
ncache_size:n set -ncache size to n.
ncache_cr enable -ncache_cr mode.
noncache_cr disable -ncache_cr mode.
ncache_no_moveraise enable no_moveraise mode.
noncache_no_moveraise disable no_moveraise mode.
wireframe enable -wireframe mode. same as "wf"
nowireframe disable -wireframe mode. same as "nowf"
wireframe:str enable -wireframe mode string.
@ -12817,12 +12830,13 @@ n
bell nobell sel nosel primary noprimary setprimary
nosetprimary clipboard noclipboard setclipboard
nosetclipboard seldir cursorshape nocursorshape
cursorpos nocursorpos cursor_drag nocursor_drag cursor
show_cursor noshow_cursor nocursor arrow xfixes noxfixes
xdamage noxdamage xd_area xd_mem alphacut alphafrac
alpharemove noalpharemove alphablend noalphablend
xwarppointer xwarp noxwarppointer noxwarp buttonmap
dragging nodragging ncache_cr noncache_cr ncache
cursorpos nocursorpos cursor_drag nocursor_drag
cursor show_cursor noshow_cursor nocursor arrow
xfixes noxfixes xdamage noxdamage xd_area xd_mem
alphacut alphafrac alpharemove noalpharemove alphablend
noalphablend xwarppointer xwarp noxwarppointer noxwarp
buttonmap dragging nodragging ncache_cr noncache_cr
ncache_no_moveraise noncache_no_moveraise ncache
noncache ncache_size wireframe_mode wireframe wf
nowireframe nowf wireframelocal wfl nowireframelocal
nowfl wirecopyrect wcr nowirecopyrect nowcr scr_area

@ -2053,7 +2053,7 @@ void print_help(int mode) {
" better results than the 'Genie' one. Also, window event\n"
" detection not as accurate as the X version.\n"
"\n"
"-ncache_cr In -nache mode, try do to copyrect opaque window\n"
"-ncache_cr In -ncache mode, try to do copyrect opaque window\n"
" moves/drags instead of wireframes (this can induce\n"
" painting errors). The wireframe will still be used when\n"
" moving a window whose save-unders has not yet been set\n"
@ -2064,7 +2064,18 @@ void print_help(int mode) {
" smoother drags than tightvnc viewer. Response may also\n"
" be choppy if the server side machine is too slow.\n"
"\n"
"-ncache_pad n In -nache mode, pad each window with n pixels for the\n"
"-ncache_no_moveraise In -ncache mode, do not assume that moving a window\n"
" will cause the window manager to raise it to the top\n"
" of the stack. The default is to assume it does, and\n"
" so at the beginning of any wireframe, etc, window moves\n"
" the window will be pushed to top in the VNC viewer.\n"
"\n"
"-ncache_no_dtchange In -ncache mode, do not try to guess when the desktop\n"
" (viewport) changes to another one (i.e. another\n"
" workarea). The default is to try to guess and when\n"
" detected try to make the transistion more smoothly.\n"
"\n"
"-ncache_pad n In -ncache mode, pad each window with n pixels for the\n"
" caching rectangles. This can be used to try to improve\n"
" the situation with dropshadows or other compositing\n"
" (e.g. MacOS X window manager), although it could make\n"
@ -3329,6 +3340,8 @@ void print_help(int mode) {
" ncache_size:n set -ncache size to n.\n"
" ncache_cr enable -ncache_cr mode.\n"
" noncache_cr disable -ncache_cr mode.\n"
" ncache_no_moveraise enable no_moveraise mode.\n"
" noncache_no_moveraise disable no_moveraise mode.\n"
" wireframe enable -wireframe mode. same as \"wf\"\n"
" nowireframe disable -wireframe mode. same as \"nowf\"\n"
" wireframe:str enable -wireframe mode string.\n"
@ -3488,12 +3501,13 @@ void print_help(int mode) {
" bell nobell sel nosel primary noprimary setprimary\n"
" nosetprimary clipboard noclipboard setclipboard\n"
" nosetclipboard seldir cursorshape nocursorshape\n"
" cursorpos nocursorpos cursor_drag nocursor_drag cursor\n"
" show_cursor noshow_cursor nocursor arrow xfixes noxfixes\n"
" xdamage noxdamage xd_area xd_mem alphacut alphafrac\n"
" alpharemove noalpharemove alphablend noalphablend\n"
" xwarppointer xwarp noxwarppointer noxwarp buttonmap\n"
" dragging nodragging ncache_cr noncache_cr ncache\n"
" cursorpos nocursorpos cursor_drag nocursor_drag\n"
" cursor show_cursor noshow_cursor nocursor arrow\n"
" xfixes noxfixes xdamage noxdamage xd_area xd_mem\n"
" alphacut alphafrac alpharemove noalpharemove alphablend\n"
" noalphablend xwarppointer xwarp noxwarppointer noxwarp\n"
" buttonmap dragging nodragging ncache_cr noncache_cr\n"
" ncache_no_moveraise noncache_no_moveraise ncache\n"
" noncache ncache_size wireframe_mode wireframe wf\n"
" nowireframe nowf wireframelocal wfl nowireframelocal\n"
" nowfl wirecopyrect wcr nowirecopyrect nowcr scr_area\n"

@ -197,16 +197,26 @@ int wireframe_local = 1;
#ifndef NCACHE
#define NCACHE -10
#endif
int ncache = NCACHE;
int ncache0 = 0;
int ncache_copyrect = 0;
int macosx_ncache_macmenu = 0;
int ncache_beta_tester = 0;
#ifdef MACOSX
int ncache = 0;
int ncache_pad = 24;
#else
int ncache = NCACHE;
int ncache_pad = 0;
#endif
int ncache0 = 0;
int ncache_copyrect = 0;
int ncache_wf_raises = 1;
int ncache_dt_change = 1;
int macosx_ncache_macmenu = 0;
int ncache_beta_tester = 0;
Atom atom_NET_ACTIVE_WINDOW = None;
Atom atom_NET_CURRENT_DESKTOP = None;
Atom atom_NET_CLIENT_LIST_STACKING = None;
double got_NET_ACTIVE_WINDOW = 0.0;
double got_NET_CURRENT_DESKTOP = 0.0;
double got_NET_CLIENT_LIST_STACKING = 0.0;
/* T+B+L+R,tkey+presist_key,tmouse+persist_mouse */
char *scroll_copyrect_str = NULL;

@ -159,10 +159,19 @@ extern int wireframe_in_progress;
extern int ncache;
extern int ncache0;
extern int ncache_copyrect;
extern int ncache_wf_raises;
extern int ncache_dt_change;
extern int ncache_pad;
extern int macosx_ncache_macmenu;
extern int ncache_beta_tester;
extern Atom atom_NET_ACTIVE_WINDOW;
extern Atom atom_NET_CURRENT_DESKTOP;
extern Atom atom_NET_CLIENT_LIST_STACKING;
extern double got_NET_ACTIVE_WINDOW;
extern double got_NET_CURRENT_DESKTOP;
extern double got_NET_CLIENT_LIST_STACKING;
extern char *scroll_copyrect_str;
extern char *scroll_copyrect;
extern char *scroll_copyrect_default;

@ -2748,6 +2748,36 @@ char *process_remote_cmd(char *cmd, int stringonly) {
ncache_copyrect = 0;
rfbLog("remote_cmd: disabled -ncache_cr %d\n", ncache_copyrect);
} else if (!strcmp(p, "ncache_no_moveraise")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, !ncache_wf_raises);
goto qry;
}
ncache_wf_raises = 0;
rfbLog("remote_cmd: set -ncache_no_moveraise\n");
} else if (!strcmp(p, "noncache_no_moveraise")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, ncache_wf_raises);
goto qry;
}
ncache_wf_raises = 1;
rfbLog("remote_cmd: disabled -ncache_no_moveraise\n");
} else if (!strcmp(p, "ncache_no_dtchange")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, !ncache_dt_change);
goto qry;
}
ncache_dt_change = 0;
rfbLog("remote_cmd: set -ncache_no_dt_change\n");
} else if (!strcmp(p, "noncache_no_dtchange")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, ncache_dt_change);
goto qry;
}
ncache_dt_change = 1;
rfbLog("remote_cmd: disabled -ncache_no_dt_change\n");
} else if (!strcmp(p, "ncache")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, !!ncache);

@ -2897,7 +2897,7 @@ if (ncache > 0) {
nomsg = 0;
}
} else {
fprintf(stderr, "*** SCAN_DISPLAY CHECK_NCACHE/%d *** %d rescan=%d\n", gotone, y, rescan);
fprintf(stderr, "\n*** SCAN_DISPLAY CHECK_NCACHE/%d *** %d rescan=%d\n", gotone, y, rescan);
}
X_UNLOCK;
check_ncache(0, 1);

@ -829,7 +829,7 @@ char find_display[] =
char create_display[] =
"#!/bin/sh\n"
"\n"
"CREATE_DISPLAY_OUTPUT=/tmp/cdo.txt\n"
"#CREATE_DISPLAY_OUTPUT=/tmp/cdo.txt\n"
"if [ \"X$CREATE_DISPLAY_EXEC\" = \"X\" ]; then\n"
" CREATE_DISPLAY_EXEC=1\n"
" export CREATE_DISPLAY_EXEC\n"

@ -360,6 +360,13 @@ Tuning
xd_area:
xd_mem:
=GAL LOFF
=GAL Ncache::
ncache
ncache_size:
ncache_cr
ncache_no_moveraise
ncache_no_dtchange
=GAL LOFF
--
=GAL SharedMemory::
noshm
@ -381,10 +388,6 @@ Tuning
rfbwait:
nodpms
nofbpm
--
ncache
ncache_size:
ncache_cr
=GAL LOFF
"
}
@ -1054,6 +1057,17 @@ changed regions. Nevertheless, x11vnc uses the DAMAGE information very
effectively as hints to improve its performance.
The items in the sub-menu allow tweaking x11vnc's DAMAGE algorithm.
"
set helptext(Ncache:) "
A simple client-side (viewer) caching scheme is enabled with the
\"-ncache n\" option. It simply uses \"n\" framebuffer sized areas
below the actual display for caching window pixel data.
Drawbacks are it uses a lot of RAM (roughly n times more), and the
pixels cache area is visible in the viewers.
The items in the sub-menu allow tweaking x11vnc's -ncache algorithm.
"
set helptext(SharedMemory:) "

@ -371,6 +371,13 @@ char gui_code[] = "";
" xd_area:\n"
" xd_mem:\n"
" =GAL LOFF\n"
" =GAL Ncache::\n"
" ncache\n"
" ncache_size:\n"
" ncache_cr\n"
" ncache_no_moveraise\n"
" ncache_no_dtchange\n"
" =GAL LOFF\n"
" --\n"
" =GAL SharedMemory::\n"
" noshm\n"
@ -392,10 +399,6 @@ char gui_code[] = "";
" rfbwait:\n"
" nodpms\n"
" nofbpm\n"
" --\n"
" ncache\n"
" ncache_size:\n"
" ncache_cr\n"
" =GAL LOFF\n"
"\"\n"
"}\n"
@ -1067,6 +1070,17 @@ char gui_code[] = "";
"The items in the sub-menu allow tweaking x11vnc's DAMAGE algorithm.\n"
"\"\n"
"\n"
" set helptext(Ncache:) \"\n"
"A simple client-side (viewer) caching scheme is enabled with the\n"
"\\\"-ncache n\\\" option. It simply uses \\\"n\\\" framebuffer sized areas\n"
"below the actual display for caching window pixel data. \n"
"\n"
"Drawbacks are it uses a lot of RAM (roughly n times more), and the\n"
"pixels cache area is visible in the viewers.\n"
"\n"
"The items in the sub-menu allow tweaking x11vnc's -ncache algorithm.\n"
"\"\n"
"\n"
" set helptext(SharedMemory:) \"\n"
"This sub-menu provides some options regarding SYSV shared memory usage\n"
"(shm) by x11vnc. Usually you want shm turned on because the x11vnc\n"

@ -1235,6 +1235,7 @@ int wait_for_client(int *argc, char** argv, int http) {
char *create_cmd = NULL;
char *users_list_save = NULL;
int created_disp = 0;
int ncache_save;
if (! use_dpy || strstr(use_dpy, "WAIT:") != use_dpy) {
return 0;
@ -1341,6 +1342,9 @@ int wait_for_client(int *argc, char** argv, int http) {
*argc = (*argc) + 1;
}
ncache_save = ncache;
ncache = 0;
initialize_allowed_input();
if (! multiple_cursors_mode) {
@ -1745,6 +1749,8 @@ if (db) fprintf(stderr, "xauth_raw_len: %d\n", n);
free(create_cmd);
}
ncache = ncache_save;
return 1;
}

File diff suppressed because it is too large Load Diff

@ -1,8 +1,8 @@
.\" This file was automatically generated from x11vnc -help output.
.TH X11VNC "1" "December 2006" "x11vnc " "User Commands"
.TH X11VNC "1" "January 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.8.4, lastmod: 2006-12-29
version: 0.8.4, lastmod: 2007-01-01
.SH SYNOPSIS
.B x11vnc
[OPTION]...
@ -2418,7 +2418,7 @@ detection not as accurate as the X version.
.PP
\fB-ncache_cr\fR
.IP
In \fB-nache\fR mode, try do to copyrect opaque window
In \fB-ncache\fR mode, try to do copyrect opaque window
moves/drags instead of wireframes (this can induce
painting errors). The wireframe will still be used when
moving a window whose save-unders has not yet been set
@ -2429,9 +2429,24 @@ with this option. On Unix, realvnc viewer gives
smoother drags than tightvnc viewer. Response may also
be choppy if the server side machine is too slow.
.PP
\fB-ncache_no_moveraise\fR
.IP
In \fB-ncache\fR mode, do not assume that moving a window
will cause the window manager to raise it to the top
of the stack. The default is to assume it does, and
so at the beginning of any wireframe, etc, window moves
the window will be pushed to top in the VNC viewer.
.PP
\fB-ncache_no_dtchange\fR
.IP
In \fB-ncache\fR mode, do not try to guess when the desktop
(viewport) changes to another one (i.e. another
workarea). The default is to try to guess and when
detected try to make the transistion more smoothly.
.PP
\fB-ncache_pad\fR \fIn\fR
.IP
In \fB-nache\fR mode, pad each window with n pixels for the
In \fB-ncache\fR mode, pad each window with n pixels for the
caching rectangles. This can be used to try to improve
the situation with dropshadows or other compositing
(e.g. MacOS X window manager), although it could make
@ -4001,6 +4016,10 @@ ncache_cr enable \fB-ncache_cr\fR mode.
.IP
noncache_cr disable \fB-ncache_cr\fR mode.
.IP
ncache_no_moveraise enable no_moveraise mode.
.IP
noncache_no_moveraise disable no_moveraise mode.
.IP
wireframe enable \fB-wireframe\fR mode. same as "wf"
.IP
nowireframe disable \fB-wireframe\fR mode. same as "nowf"
@ -4277,12 +4296,13 @@ clear_keys noclear_keys remap repeat norepeat fb nofb
bell nobell sel nosel primary noprimary setprimary
nosetprimary clipboard noclipboard setclipboard
nosetclipboard seldir cursorshape nocursorshape
cursorpos nocursorpos cursor_drag nocursor_drag cursor
show_cursor noshow_cursor nocursor arrow xfixes noxfixes
xdamage noxdamage xd_area xd_mem alphacut alphafrac
alpharemove noalpharemove alphablend noalphablend
xwarppointer xwarp noxwarppointer noxwarp buttonmap
dragging nodragging ncache_cr noncache_cr ncache
cursorpos nocursorpos cursor_drag nocursor_drag
cursor show_cursor noshow_cursor nocursor arrow
xfixes noxfixes xdamage noxdamage xd_area xd_mem
alphacut alphafrac alpharemove noalpharemove alphablend
noalphablend xwarppointer xwarp noxwarppointer noxwarp
buttonmap dragging nodragging ncache_cr noncache_cr
ncache_no_moveraise noncache_no_moveraise ncache
noncache ncache_size wireframe_mode wireframe wf
nowireframe nowf wireframelocal wfl nowireframelocal
nowfl wirecopyrect wcr nowirecopyrect nowcr scr_area

@ -1451,7 +1451,7 @@ char msg[] =
"\n"
"Hello! Exciting News!!\n"
"\n"
"You have been selected at random to beta test the x11vnc '-ncache' VNC\n"
"You have been selected at random to beta-test the x11vnc '-ncache' VNC\n"
"client-side pixel caching feature!\n"
"\n"
"This scheme stores pixel data offscreen on the VNC viewer side for faster\n"
@ -1468,12 +1468,13 @@ char msg[] =
"would notice and use the -ncache option (e.g. the wireframe and scroll\n"
"detection features are on by default). A couple things to note:\n"
"\n"
" 1) It uses a large amount of RAM (on both viewer and server)\n"
" 1) It uses a large amount of RAM (on both viewer and server sides)\n"
"\n"
" 2) You can actually see the cached pixel data if you scroll down\n"
" to it in your viewer; adjust your viewer's size to hide it.\n"
"\n"
"More info: http://www.karlrunge.com/x11vnc/#faq-client-caching\n"
"waiting for connections:\n"
;
if (raw_fb_str && !macosx_console) {
@ -2161,6 +2162,10 @@ int main(int argc, char* argv[]) {
}
} else if (!strcmp(arg, "-ncache_cr")) {
ncache_copyrect = 1;
} else if (!strcmp(arg, "-ncache_no_moveraise")) {
ncache_wf_raises = 1;
} else if (!strcmp(arg, "-ncache_no_dtchange")) {
ncache_dt_change = 0;
} else if (!strcmp(arg, "-ncache_pad")) {
CHECK_ARGC
ncache_pad = atoi(argv[++i]);
@ -3249,6 +3254,7 @@ int main(int argc, char* argv[]) {
multiple_cursors_mode = strdup("most");
if (! quiet && ! raw_fb_str) {
rfbLog("\n");
rfbLog("XFIXES available on display, resetting cursor mode\n");
rfbLog(" to: '-cursor most'.\n");
rfbLog(" to disable this behavior use: '-cursor arrow'\n");
@ -3390,13 +3396,13 @@ int main(int argc, char* argv[]) {
if (! quiet && ncache && ! raw_fb_str) {
rfbLog("\n");
rfbLog("Client Side Caching: -ncache mode is in effect to provide\n");
rfbLog(" some client-side pixel data caching. This speeds up\n");
rfbLog(" client-side pixel data caching. This speeds up\n");
rfbLog(" iconifying/deiconifying windows, moving and raising\n");
rfbLog(" windows, and reposting menus. In the simple CopyRect\n");
rfbLog(" encoding scheme used (no compression) a huge amount\n");
rfbLog(" of extra memory (20-80MB) is used on both the server and\n");
rfbLog(" client sides. This mode works with any VNC viewer,\n");
rfbLog(" however in most you can actually see the cached pixel\n");
rfbLog(" client sides. This mode works with any VNC viewer.\n");
rfbLog(" However, in most you can actually see the cached pixel\n");
rfbLog(" data by scrolling down, so you need to re-adjust its size.\n");
rfbLog(" See http://www.karlrunge.com/x11vnc/#faq-client-caching.\n");
rfbLog(" If this mode yields undesired behavior (poor response,\n");

@ -464,9 +464,13 @@ extern double last_pointer_motion_time;
extern double last_key_to_button_remap_time;
extern double last_copyrect;
extern double last_copyrect_fix;
extern double last_wireframe;
extern double servertime_diff;
extern double x11vnc_start;
extern double last_get_wm_frame_time;
extern Window last_get_wm_frame;
extern int hack_val;
/* last client to move pointer */

@ -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-29";
char lastmod[] = "0.8.4 lastmod: 2007-01-01";
/* X display info */
@ -128,9 +128,13 @@ double last_pointer_motion_time = 0.0;
double last_key_to_button_remap_time = 0.0;
double last_copyrect = 0.0;
double last_copyrect_fix = 0.0;
double last_wireframe = 0.0;
double servertime_diff = 0.0;
double x11vnc_start = 0.0;
double last_get_wm_frame_time = 0.0;
Window last_get_wm_frame = None;
int hack_val = 0;
/* last client to move pointer */

@ -19,7 +19,7 @@
int grab_buster = 0;
int grab_kbd = 0;
int grab_ptr = 0;
int sync_tod_delay = 3;
int sync_tod_delay = 20;
void initialize_vnc_connect_prop(void);
void initialize_x11vnc_remote_prop(void);
@ -28,6 +28,7 @@ void spawn_grab_buster(void);
void sync_tod_with_servertime(void);
void check_keycode_state(void);
void check_autorepeat(void);
void set_prop_atom(Atom atom);
void check_xevents(int reset);
void xcut_receive(char *text, int len, rfbClientPtr cl);
@ -600,6 +601,16 @@ void sync_tod_with_servertime(void) {
RAWFB_RET_VOID
if (atom_NET_ACTIVE_WINDOW == None) {
atom_NET_ACTIVE_WINDOW = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
}
if (atom_NET_CURRENT_DESKTOP == None) {
atom_NET_CURRENT_DESKTOP = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False);
}
if (atom_NET_CLIENT_LIST_STACKING == None) {
atom_NET_CLIENT_LIST_STACKING = XInternAtom(dpy, "_NET_CLIENT_LIST_STACKING", False);
}
if (! ticker_atom) {
ticker_atom = XInternAtom(dpy, "X11VNC_TICKER", False);
}
@ -609,7 +620,7 @@ void sync_tod_with_servertime(void) {
XSync(dpy, False);
while (XCheckTypedEvent(dpy, PropertyNotify, &xev)) {
;
set_prop_atom(xev.xproperty.atom);
}
snprintf(diff, 128, "%d/%08d/%lu/%.6f", (int) getpid(), seq++,
@ -739,6 +750,13 @@ void check_autorepeat(void) {
}
}
void set_prop_atom(Atom atom) {
if (atom == None) return;
if (atom == atom_NET_ACTIVE_WINDOW) got_NET_ACTIVE_WINDOW = dnow();
if (atom == atom_NET_CURRENT_DESKTOP) got_NET_CURRENT_DESKTOP = dnow();
if (atom == atom_NET_CLIENT_LIST_STACKING) got_NET_CLIENT_LIST_STACKING = dnow();
}
/*
* This routine is periodically called to check for selection related
* and other X11 events and respond to them as needed.
@ -871,7 +889,10 @@ void check_xevents(int reset) {
* Go retrieve X11VNC_REMOTE string.
*/
read_x11vnc_remote_prop(0);
}
set_prop_atom(xev.xproperty.atom);
}
}

@ -15,6 +15,7 @@ extern void spawn_grab_buster(void);
extern void sync_tod_with_servertime(void);
extern void check_keycode_state(void);
extern void check_autorepeat(void);
extern void set_prop_atom(Atom atom);
extern void check_xevents(int reset);
extern void xcut_receive(char *text, int len, rfbClientPtr cl);

Loading…
Cancel
Save