Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
7717d245
Commit
7717d245
authored
Jan 10, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some -ncache performance improvements, rootpixmap watching, gnome wm heuristics
parent
5b3e420c
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
426 additions
and
140 deletions
+426
-140
README
x11vnc/README
+70
-57
help.c
x11vnc/help.c
+36
-25
options.c
x11vnc/options.c
+6
-1
options.h
x11vnc/options.h
+2
-0
remote.c
x11vnc/remote.c
+34
-0
scan.c
x11vnc/scan.c
+13
-2
screen.c
x11vnc/screen.c
+3
-0
tkx11vnc
x11vnc/tkx11vnc
+4
-0
tkx11vnc.h
x11vnc/tkx11vnc.h
+4
-0
userinput.c
x11vnc/userinput.c
+175
-22
userinput.h
x11vnc/userinput.h
+2
-0
x11vnc.1
x11vnc/x11vnc.1
+44
-26
x11vnc.c
x11vnc/x11vnc.c
+2
-0
x11vnc.h
x11vnc/x11vnc.h
+1
-0
x11vnc_defs.c
x11vnc/x11vnc_defs.c
+2
-1
xdamage.c
x11vnc/xdamage.c
+17
-3
xevents.c
x11vnc/xevents.c
+7
-3
xinerama.c
x11vnc/xinerama.c
+3
-0
xrandr.h
x11vnc/xrandr.h
+1
-0
No files found.
x11vnc/README
View file @
7717d245
This diff is collapsed.
Click to expand it.
x11vnc/help.c
View file @
7717d245
...
...
@@ -2079,6 +2079,10 @@ void print_help(int mode) {
" workarea). The default is to try to guess and when
\n
"
" detected try to make the transistion more smoothly.
\n
"
"
\n
"
"-ncache_no_rootpixmap In -ncache mode, do not try to snapshot the desktop
\n
"
" background to use in guessing or reconstructing window
\n
"
" save-unders..
\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
"
...
...
@@ -3344,8 +3348,13 @@ 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
"
" ncache_no_moveraise enable no_moveraise mode.
\n
"
" noncache_no_moveraise disable no_moveraise mode.
\n
"
" ncache_no_dtchange enable ncache_no_dtchange mode.
\n
"
" noncache_no_dtchange disable ncache_no_dtchange mode.
\n
"
" ncache_no_rootpixmap enable ncache_no_rootpixmap.
\n
"
" noncache_no_rootpixmap disable ncache_no_rootpixmap.
\n
"
" ncache_reset_rootpixmap recheck the root pixmap
\n
"
" wireframe enable -wireframe mode. same as
\"
wf
\"\n
"
" nowireframe disable -wireframe mode. same as
\"
nowf
\"\n
"
" wireframe:str enable -wireframe mode string.
\n
"
...
...
@@ -3505,29 +3514,31 @@ 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
\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
"
" scr_skip scr_inc scr_keys scr_term scr_keyrepeat
\n
"
" scr_parms scrollcopyrect scr noscrollcopyrect noscr
\n
"
" fixscreen noxrecord xrecord reset_record pointer_mode
\n
"
" pm input_skip allinput noallinput input grabkbd
\n
"
" nograbkbd grabptr nograbptr client_input ssltimeout
\n
"
" speeds wmdt debug_pointer dp nodebug_pointer nodp
\n
"
" debug_keyboard dk nodebug_keyboard nodk deferupdate
\n
"
" defer wait_ui wait_bog nowait_bog slow_fb wait
\n
"
" readtimeout nap nonap sb screen_blank fbpm nofbpm
\n
"
" dpms nodpms fs gaps grow fuzz snapfb nosnapfb rawfb
\n
"
" uinput_accel uinput_thresh uinput_reset uinput_always
\n
"
" progressive rfbport http nohttp httpport httpdir
\n
"
" enablehttpproxy noenablehttpproxy alwaysshared
\n
"
" cursorpos nocursorpos cursor_drag nocursor_drag cursor
\n
"
" show_cursor noshow_cursor nocursor arrow xfixes
\n
"
" noxfixes xdamage noxdamage xd_area xd_mem alphacut
\n
"
" alphafrac alpharemove noalpharemove alphablend
\n
"
" noalphablend xwarppointer xwarp noxwarppointer
\n
"
" noxwarp buttonmap dragging nodragging ncache_cr
\n
"
" noncache_cr ncache_no_moveraise noncache_no_moveraise
\n
"
" ncache_no_dtchange noncache_no_dtchange
\n
"
" ncache_no_rootpixmap noncache_no_rootpixmap
\n
"
" ncache_reset_rootpixmap ncache noncache ncache_size
\n
"
" wireframe_mode wireframe wf nowireframe nowf
\n
"
" wireframelocal wfl nowireframelocal nowfl wirecopyrect
\n
"
" wcr nowirecopyrect nowcr scr_area scr_skip scr_inc
\n
"
" scr_keys scr_term scr_keyrepeat scr_parms scrollcopyrect
\n
"
" scr noscrollcopyrect noscr fixscreen noxrecord xrecord
\n
"
" reset_record pointer_mode pm input_skip allinput
\n
"
" noallinput input grabkbd nograbkbd grabptr nograbptr
\n
"
" client_input ssltimeout speeds wmdt debug_pointer dp
\n
"
" nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
\n
"
" nodk deferupdate defer wait_ui wait_bog nowait_bog
\n
"
" slow_fb wait readtimeout nap nonap sb screen_blank
\n
"
" fbpm nofbpm dpms nodpms fs gaps grow fuzz snapfb
\n
"
" nosnapfb rawfb uinput_accel uinput_thresh uinput_reset
\n
"
" uinput_always progressive rfbport http nohttp httpport
\n
"
" httpdir enablehttpproxy noenablehttpproxy alwaysshared
\n
"
" noalwaysshared nevershared noalwaysshared dontdisconnect
\n
"
" nodontdisconnect desktop debug_xevents nodebug_xevents
\n
"
" debug_xevents debug_xdamage nodebug_xdamage
\n
"
...
...
x11vnc/options.c
View file @
7717d245
...
...
@@ -208,7 +208,10 @@ int ncache_pad = 24;
int
ncache
=
NCACHE
;
int
ncache_pad
=
0
;
#endif
int
ncache_xrootpmap
=
1
;
#ifndef NCACHE_XROOTPMAP
#define NCACHE_XROOTPMAP 1
#endif
int
ncache_xrootpmap
=
NCACHE_XROOTPMAP
;
int
ncache0
=
0
;
int
ncache_copyrect
=
0
;
int
ncache_wf_raises
=
1
;
...
...
@@ -219,9 +222,11 @@ int ncache_beta_tester = 0;
Atom
atom_NET_ACTIVE_WINDOW
=
None
;
Atom
atom_NET_CURRENT_DESKTOP
=
None
;
Atom
atom_NET_CLIENT_LIST_STACKING
=
None
;
Atom
atom_XROOTPMAP_ID
=
None
;
double
got_NET_ACTIVE_WINDOW
=
0
.
0
;
double
got_NET_CURRENT_DESKTOP
=
0
.
0
;
double
got_NET_CLIENT_LIST_STACKING
=
0
.
0
;
double
got_XROOTPMAP_ID
=
0
.
0
;
/* T+B+L+R,tkey+presist_key,tmouse+persist_mouse */
char
*
scroll_copyrect_str
=
NULL
;
...
...
x11vnc/options.h
View file @
7717d245
...
...
@@ -169,9 +169,11 @@ 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
Atom
atom_XROOTPMAP_ID
;
extern
double
got_NET_ACTIVE_WINDOW
;
extern
double
got_NET_CURRENT_DESKTOP
;
extern
double
got_NET_CLIENT_LIST_STACKING
;
extern
double
got_XROOTPMAP_ID
;
extern
char
*
scroll_copyrect_str
;
extern
char
*
scroll_copyrect
;
...
...
x11vnc/remote.c
View file @
7717d245
...
...
@@ -2779,6 +2779,40 @@ char *process_remote_cmd(char *cmd, int stringonly) {
ncache_dt_change
=
1
;
rfbLog
(
"remote_cmd: disabled -ncache_no_dt_change
\n
"
);
}
else
if
(
!
strcmp
(
p
,
"ncache_no_rootpixmap"
))
{
int
orig
=
ncache_xrootpmap
;
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
!
ncache_xrootpmap
);
goto
qry
;
}
ncache_xrootpmap
=
0
;
rfbLog
(
"remote_cmd: set -ncache_no_rootpixmap
\n
"
);
if
(
orig
!=
ncache_xrootpmap
)
{
do_new_fb
(
1
);
}
}
else
if
(
!
strcmp
(
p
,
"noncache_no_rootpixmap"
))
{
int
orig
=
ncache_xrootpmap
;
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
ncache_xrootpmap
);
goto
qry
;
}
ncache_xrootpmap
=
1
;
rfbLog
(
"remote_cmd: disabled -ncache_no_rootpixmap
\n
"
);
if
(
orig
!=
ncache_xrootpmap
)
{
do_new_fb
(
1
);
}
}
else
if
(
!
strcmp
(
p
,
"ncache_reset_rootpixmap"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
!
ncache_xrootpmap
);
goto
qry
;
}
if
(
ncache_xrootpmap
)
{
rfbLog
(
"remote_cmd: resetting root pixmap.
\n
"
);
set_ncache_xrootpmap
();
}
}
else
if
(
!
strcmp
(
p
,
"ncache"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
!!
ncache
);
...
...
x11vnc/scan.c
View file @
7717d245
...
...
@@ -2846,11 +2846,15 @@ static int scan_display(int ystart, int rescan) {
y
=
ystart
;
g_now
=
dnow
();
if
(
!
main_fb
)
{
rfbLog
(
"scan_display: no main_fb!
\n
"
);
return
0
;
}
X_LOCK
;
while
(
y
<
dpy_y
)
{
if
(
use_xdamage
)
{
...
...
@@ -2863,7 +2867,6 @@ static int scan_display(int ystart, int rescan) {
}
/* grab the horizontal scanline from the display: */
X_LOCK
;
#ifndef NO_NCACHE
/* XXX Y test */
...
...
@@ -2878,12 +2881,18 @@ if (ncache > 0) {
XEvent
ev
;
if
(
raw_fb_str
)
{
;
}
else
if
(
XEventsQueued
(
dpy
,
QueuedAlready
)
==
0
)
{
;
/* XXX Y resp */
}
else
if
(
XCheckTypedEvent
(
dpy
,
MapNotify
,
&
ev
))
{
gotone
=
1
;
}
else
if
(
XCheckTypedEvent
(
dpy
,
UnmapNotify
,
&
ev
))
{
gotone
=
2
;
}
else
if
(
XCheckTypedEvent
(
dpy
,
CreateNotify
,
&
ev
))
{
gotone
=
3
;
}
else
if
(
XCheckTypedEvent
(
dpy
,
ConfigureNotify
,
&
ev
))
{
gotone
=
4
;
}
else
if
(
XCheckTypedEvent
(
dpy
,
VisibilityNotify
,
&
ev
))
{
gotone
=
5
;
}
if
(
gotone
)
{
XPutBackEvent
(
dpy
,
&
ev
);
...
...
@@ -2909,7 +2918,6 @@ fprintf(stderr, "\n*** SCAN_DISPLAY CHECK_NCACHE/%d *** %d rescan=%d\n", gotone,
XRANDR_SET_TRAP_RET
(
-
1
,
"scan_display-set"
);
copy_image
(
scanline
,
0
,
y
,
0
,
0
);
XRANDR_CHK_TRAP_RET
(
-
1
,
"scan_display-chk"
);
X_UNLOCK
;
/* for better memory i/o try the whole line at once */
src
=
scanline
->
data
;
...
...
@@ -2979,6 +2987,9 @@ fprintf(stderr, "\n*** SCAN_DISPLAY CHECK_NCACHE/%d *** %d rescan=%d\n", gotone,
}
y
+=
NSCAN
;
}
X_UNLOCK
;
return
tile_count
;
}
...
...
x11vnc/screen.c
View file @
7717d245
...
...
@@ -746,6 +746,9 @@ void do_new_fb(int reset_mem) {
initialize_blackouts_and_xinerama
();
initialize_polling_images
();
}
if
(
ncache
)
{
check_ncache
(
1
,
0
);
}
}
static
void
remove_fake_fb
(
void
)
{
...
...
x11vnc/tkx11vnc
View file @
7717d245
...
...
@@ -55,6 +55,8 @@ catch {rename send {}}
# 0 means to skip the item.
# -- means add a separator
#
# The =GAL ... =GAL LOFF stuff is to provide submenus.
#
global
env
started time_count
set
started
""
...
...
@@ -366,6 +368,8 @@ Tuning
ncache_cr
ncache_no_moveraise
ncache_no_dtchange
ncache_no_rootpixmap
=A ncache_reset_rootpixmap
=GAL LOFF
--
=GAL SharedMemory::
...
...
x11vnc/tkx11vnc.h
View file @
7717d245
...
...
@@ -66,6 +66,8 @@ char gui_code[] = "";
"# 0 means to skip the item.
\n
"
"# -- means add a separator
\n
"
"#
\n
"
"# The =GAL ... =GAL LOFF stuff is to provide submenus.
\n
"
"#
\n
"
"
\n
"
"global env started time_count
\n
"
"set started
\"\"\n
"
...
...
@@ -377,6 +379,8 @@ char gui_code[] = "";
" ncache_cr
\n
"
" ncache_no_moveraise
\n
"
" ncache_no_dtchange
\n
"
" ncache_no_rootpixmap
\n
"
" =A ncache_reset_rootpixmap
\n
"
" =GAL LOFF
\n
"
" --
\n
"
" =GAL SharedMemory::
\n
"
...
...
x11vnc/userinput.c
View file @
7717d245
This diff is collapsed.
Click to expand it.
x11vnc/userinput.h
View file @
7717d245
...
...
@@ -39,5 +39,7 @@ extern void do_copyregion(sraRegionPtr region, int dx, int dy, int mode);
extern
int
check_ncache
(
int
reset
,
int
mode
);
extern
int
find_rect
(
int
idx
,
int
x
,
int
y
,
int
w
,
int
h
);
extern
int
lookup_win_index
(
Window
);
extern
void
set_ncache_xrootpmap
(
void
);
#endif
/* _X11VNC_USERINPUT_H */
x11vnc/x11vnc.1
View file @
7717d245
...
...
@@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.8.4, lastmod: 2007-01-
09
version: 0.8.4, lastmod: 2007-01-
10
.SH SYNOPSIS
.B x11vnc
[OPTION]...
...
...
@@ -2448,6 +2448,12 @@ In \fB-ncache\fR mode, do not try to guess when the desktop
workarea). The default is to try to guess and when
detected try to make the transistion more smoothly.
.PP
\fB-ncache_no_rootpixmap\fR
.IP
In \fB-ncache\fR mode, do not try to snapshot the desktop
background to use in guessing or reconstructing window
save-unders..
.PP
\fB-ncache_pad\fR \fIn\fR
.IP
In \fB-ncache\fR mode, pad each window with n pixels for the
...
...
@@ -4020,9 +4026,19 @@ 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.
ncache_no_moveraise enable no_moveraise mode.
.IP
noncache_no_moveraise disable no_moveraise mode.
.IP
ncache_no_dtchange enable ncache_no_dtchange mode.
.IP
noncache_no_dtchange disable ncache_no_dtchange mode.
.IP
ncache_no_rootpixmap enable ncache_no_rootpixmap.
.IP
noncache_no_rootpixmap disable ncache_no_rootpixmap.
.IP
n
oncache_no_moveraise disable no_moveraise mode.
n
cache_reset_rootpixmap recheck the root pixmap
.IP
wireframe enable \fB-wireframe\fR mode. same as "wf"
.IP
...
...
@@ -4300,29 +4316,31 @@ 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_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
scr_skip scr_inc scr_keys scr_term scr_keyrepeat
scr_parms scrollcopyrect scr noscrollcopyrect noscr
fixscreen noxrecord xrecord reset_record pointer_mode
pm input_skip allinput noallinput input grabkbd
nograbkbd grabptr nograbptr client_input ssltimeout
speeds wmdt debug_pointer dp nodebug_pointer nodp
debug_keyboard dk nodebug_keyboard nodk deferupdate
defer wait_ui wait_bog nowait_bog slow_fb wait
readtimeout nap nonap sb screen_blank fbpm nofbpm
dpms nodpms fs gaps grow fuzz snapfb nosnapfb rawfb
uinput_accel uinput_thresh uinput_reset uinput_always
progressive rfbport http nohttp httpport httpdir
enablehttpproxy noenablehttpproxy alwaysshared
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_no_dtchange noncache_no_dtchange
ncache_no_rootpixmap noncache_no_rootpixmap
ncache_reset_rootpixmap ncache noncache ncache_size
wireframe_mode wireframe wf nowireframe nowf
wireframelocal wfl nowireframelocal nowfl wirecopyrect
wcr nowirecopyrect nowcr scr_area scr_skip scr_inc
scr_keys scr_term scr_keyrepeat scr_parms scrollcopyrect
scr noscrollcopyrect noscr fixscreen noxrecord xrecord
reset_record pointer_mode pm input_skip allinput
noallinput input grabkbd nograbkbd grabptr nograbptr
client_input ssltimeout speeds wmdt debug_pointer dp
nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
nodk deferupdate defer wait_ui wait_bog nowait_bog
slow_fb wait readtimeout nap nonap sb screen_blank
fbpm nofbpm dpms nodpms fs gaps grow fuzz snapfb
nosnapfb rawfb uinput_accel uinput_thresh uinput_reset
uinput_always progressive rfbport http nohttp httpport
httpdir enablehttpproxy noenablehttpproxy alwaysshared
noalwaysshared nevershared noalwaysshared dontdisconnect
nodontdisconnect desktop debug_xevents nodebug_xevents
debug_xevents debug_xdamage nodebug_xdamage
...
...
x11vnc/x11vnc.c
View file @
7717d245
...
...
@@ -2171,6 +2171,8 @@ int main(int argc, char* argv[]) {
ncache_wf_raises
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-ncache_no_dtchange"
))
{
ncache_dt_change
=
0
;
}
else
if
(
!
strcmp
(
arg
,
"-ncache_no_rootpixmap"
))
{
ncache_xrootpmap
=
0
;
}
else
if
(
!
strcmp
(
arg
,
"-ncache_pad"
))
{
CHECK_ARGC
ncache_pad
=
atoi
(
argv
[
++
i
]);
...
...
x11vnc/x11vnc.h
View file @
7717d245
...
...
@@ -467,6 +467,7 @@ extern double last_copyrect_fix;
extern
double
last_wireframe
;
extern
double
servertime_diff
;
extern
double
x11vnc_start
;
extern
double
g_now
;
extern
double
last_get_wm_frame_time
;
extern
Window
last_get_wm_frame
;
...
...
x11vnc/x11vnc_defs.c
View file @
7717d245
...
...
@@ -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: 2007-01-
09
"
;
char
lastmod
[]
=
"0.8.4 lastmod: 2007-01-
10
"
;
/* X display info */
...
...
@@ -131,6 +131,7 @@ double last_copyrect_fix = 0.0;
double
last_wireframe
=
0
.
0
;
double
servertime_diff
=
0
.
0
;
double
x11vnc_start
=
0
.
0
;
double
g_now
=
0
.
0
;
double
last_get_wm_frame_time
=
0
.
0
;
Window
last_get_wm_frame
=
None
;
...
...
x11vnc/xdamage.c
View file @
7717d245
...
...
@@ -542,6 +542,8 @@ if (0) XEventsQueued(dpy, QueuedAfterFlush);
int
xdamage_hint_skip
(
int
y
)
{
static
sraRegionPtr
scanline
=
NULL
;
static
sraRegionPtr
tmpl_y
=
NULL
;
int
fast_tmpl
=
1
;
sraRegionPtr
reg
,
tmpl
;
int
ret
,
i
,
n
,
nreg
;
static
int
ncache_no_skip
=
0
;
...
...
@@ -559,13 +561,16 @@ int xdamage_hint_skip(int y) {
/* keep it around to avoid malloc etc, recreate */
scanline
=
sraRgnCreate
();
}
if
(
!
tmpl_y
)
{
tmpl_y
=
sraRgnCreateRect
(
0
,
0
,
dpy_x
,
1
);
}
nreg
=
(
xdamage_memory
*
NSCAN
)
+
1
;
#ifndef NO_NCACHE
if
(
ncache
>
0
)
{
if
(
ncache_no_skip
==
0
)
{
double
now
=
dnow
()
;
double
now
=
g_now
;
if
(
now
>
last_ncache_no_skip
+
8
.
0
)
{
ncache_no_skip
=
1
;
}
else
if
(
now
<
last_bs_restore
+
0
.
5
)
{
...
...
@@ -595,7 +600,12 @@ int xdamage_hint_skip(int y) {
}
#endif
tmpl
=
sraRgnCreateRect
(
0
,
y
,
dpy_x
,
y
+
1
);
if
(
fast_tmpl
)
{
sraRgnOffset
(
tmpl_y
,
0
,
y
);
tmpl
=
tmpl_y
;
}
else
{
tmpl
=
sraRgnCreateRect
(
0
,
y
,
dpy_x
,
y
+
1
);
}
ret
=
1
;
for
(
i
=
0
;
i
<
nreg
;
i
++
)
{
...
...
@@ -616,7 +626,11 @@ int xdamage_hint_skip(int y) {
break
;
}
}
sraRgnDestroy
(
tmpl
);
if
(
fast_tmpl
)
{
sraRgnOffset
(
tmpl_y
,
0
,
-
y
);
}
else
{
sraRgnDestroy
(
tmpl
);
}
if
(
0
)
fprintf
(
stderr
,
"xdamage_hint_skip: %d -> %d
\n
"
,
y
,
ret
);
return
ret
;
...
...
x11vnc/xevents.c
View file @
7717d245
...
...
@@ -602,13 +602,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"
,
Fals
e
);
atom_NET_ACTIVE_WINDOW
=
XInternAtom
(
dpy
,
"_NET_ACTIVE_WINDOW"
,
Tru
e
);
}
if
(
atom_NET_CURRENT_DESKTOP
==
None
)
{
atom_NET_CURRENT_DESKTOP
=
XInternAtom
(
dpy
,
"_NET_CURRENT_DESKTOP"
,
Fals
e
);
atom_NET_CURRENT_DESKTOP
=
XInternAtom
(
dpy
,
"_NET_CURRENT_DESKTOP"
,
Tru
e
);
}
if
(
atom_NET_CLIENT_LIST_STACKING
==
None
)
{
atom_NET_CLIENT_LIST_STACKING
=
XInternAtom
(
dpy
,
"_NET_CLIENT_LIST_STACKING"
,
False
);
atom_NET_CLIENT_LIST_STACKING
=
XInternAtom
(
dpy
,
"_NET_CLIENT_LIST_STACKING"
,
True
);
}
if
(
atom_XROOTPMAP_ID
==
None
)
{
atom_XROOTPMAP_ID
=
XInternAtom
(
dpy
,
"_XROOTPMAP_ID"
,
True
);
}
if
(
!
ticker_atom
)
{
...
...
@@ -755,6 +758,7 @@ void set_prop_atom(Atom atom) {
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
();
if
(
atom
==
atom_XROOTPMAP_ID
)
got_XROOTPMAP_ID
=
dnow
();
}
/*
...
...
x11vnc/xinerama.c
View file @
7717d245
...
...
@@ -418,6 +418,9 @@ void zero_fb(int x1, int y1, int x2, int y2) {
#ifndef NO_NCACHE
if
(
ncache
>
0
)
{
yfac
=
1
+
ncache
;
if
(
ncache_xrootpmap
)
{
yfac
++
;
}
}
#endif
...
...
x11vnc/xrandr.h
View file @
7717d245
...
...
@@ -25,6 +25,7 @@ extern int known_xrandr_mode(char *s);
if (check_xrandr_event(y)) { \
trapped_getimage_xerror = 0; \
XSetErrorHandler(old_getimage_handler); \
X_UNLOCK; \
return(x); \
} \
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment