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
89148d77
Commit
89148d77
authored
Jun 04, 2005
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main.c: no sraRgnSubstract for copyRect, scrolls for x11vnc -scale; add -fixscreen
parent
4effb62e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
442 additions
and
156 deletions
+442
-156
ChangeLog
ChangeLog
+4
-0
main.c
libvncserver/main.c
+3
-7
ChangeLog
x11vnc/ChangeLog
+5
-0
README
x11vnc/README
+84
-54
tkx11vnc
x11vnc/tkx11vnc
+1
-0
tkx11vnc.h
x11vnc/tkx11vnc.h
+1
-0
x11vnc.1
x11vnc/x11vnc.1
+65
-32
x11vnc.c
x11vnc/x11vnc.c
+279
-63
No files found.
ChangeLog
View file @
89148d77
2005-06-03 Karl Runge <runge@karlrunge.com>
* libvncserver/main.c: remove sraRgnSubtract from copyRegion
* x11vnc: scrollcopyrect under -scale, add -fixscreen.
2005-05-30 Karl Runge <runge@karlrunge.com>
2005-05-30 Karl Runge <runge@karlrunge.com>
* libvncserver/main.c: fix copyRect for non-cursor-shape-aware clients.
* libvncserver/main.c: fix copyRect for non-cursor-shape-aware clients.
...
...
libvncserver/main.c
View file @
89148d77
...
@@ -148,10 +148,8 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
...
@@ -148,10 +148,8 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
if
(
!
sraRgnEmpty
(
cursorRegion
))
{
if
(
!
sraRgnEmpty
(
cursorRegion
))
{
/*
/*
* current cursor rect overlaps with the copy region *dest*,
* current cursor rect overlaps with the copy region *dest*,
* so remove it from the copy-rect treatment, and mark it as
* mark it as modified since we won't copy-rect stuff to it.
* modified since we won't copy-rect stuff to it.
*/
*/
sraRgnSubtract
(
cl
->
copyRegion
,
cursorRegion
);
sraRgnOr
(
cl
->
modifiedRegion
,
cursorRegion
);
sraRgnOr
(
cl
->
modifiedRegion
,
cursorRegion
);
}
}
sraRgnDestroy
(
cursorRegion
);
sraRgnDestroy
(
cursorRegion
);
...
@@ -163,11 +161,9 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
...
@@ -163,11 +161,9 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
if
(
!
sraRgnEmpty
(
cursorRegion
))
{
if
(
!
sraRgnEmpty
(
cursorRegion
))
{
/*
/*
* current cursor rect overlaps with the copy region *source*,
* current cursor rect overlaps with the copy region *source*,
* so remove it from the copy-rect treatment, and mark the
* mark the *displaced* cursorRegion as modified since we
* *displaced* cursorRegion as modified since we won't copyrect
* won't copyrect stuff to it.
* stuff to it.
*/
*/
sraRgnSubtract
(
cl
->
copyRegion
,
cursorRegion
);
sraRgnOr
(
cl
->
modifiedRegion
,
cursorRegion
);
sraRgnOr
(
cl
->
modifiedRegion
,
cursorRegion
);
}
}
sraRgnDestroy
(
cursorRegion
);
sraRgnDestroy
(
cursorRegion
);
...
...
x11vnc/ChangeLog
View file @
89148d77
2005-06-03 Karl Runge <runge@karlrunge.com>
* make scrollcopyrect more or less usable under -scale
* add -fixscreen for periodic cleanup of painting errors.
* adjust keyrepeat scroll behavior.
2005-05-30 Karl Runge <runge@karlrunge.com>
2005-05-30 Karl Runge <runge@karlrunge.com>
* alter "magic cleanup key sequences" (N*Alt_L and N*Super_L)
* alter "magic cleanup key sequences" (N*Alt_L and N*Super_L)
* dial down check_xrecord_reset() reset times.
* dial down check_xrecord_reset() reset times.
...
...
x11vnc/README
View file @
89148d77
x11vnc
README
file
Date
:
Tue
May
31
00
:
10
:
51
EDT
2005
x11vnc
README
file
Date
:
Fri
Jun
3
23
:
10
:
08
EDT
2005
The
following
information
is
taken
from
these
URLs
:
The
following
information
is
taken
from
these
URLs
:
...
@@ -4260,7 +4260,7 @@ x11vnc: a VNC server for real X displays
...
@@ -4260,7 +4260,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.7.2
lastmod
:
2005
-
0
5
-
30
x11vnc
:
allow
VNC
connections
to
real
X11
displays
.
0.7.2
lastmod
:
2005
-
0
6
-
03
x11vnc
options
:
x11vnc
options
:
-
display
disp
-
auth
file
-
display
disp
-
auth
file
...
@@ -4312,27 +4312,27 @@ x11vnc options:
...
@@ -4312,27 +4312,27 @@ x11vnc options:
-
scr_skip
list
-
scr_inc
list
-
scr_skip
list
-
scr_inc
list
-
scr_keys
list
-
scr_term
list
-
scr_keys
list
-
scr_term
list
-
scr_keyrepeat
lo
-
hi
-
scr_parms
string
-
scr_keyrepeat
lo
-
hi
-
scr_parms
string
-
debug_scroll
-
noxrecord
-
fixscreen
string
-
debug_scroll
-
pointer_mode
n
-
input_skip
n
-
noxrecord
-
pointer_mode
n
-
speeds
rd
,
bw
,
lat
-
debug_pointer
-
input_skip
n
-
speeds
rd
,
bw
,
lat
-
debug_
keyboard
-
defer
time
-
debug_
pointer
-
debug_keyboard
-
wait
time
-
wait_ui
factor
-
defer
time
-
wait
time
-
nowait_bog
-
readtimeout
n
-
wait_ui
factor
-
nowait_bog
-
nap
-
nonap
-
readtimeout
n
-
nap
-
sb
time
-
noxdamage
-
nonap
-
sb
time
-
xd_area
A
-
xd_mem
f
-
noxdamage
-
xd_area
A
-
sigpipe
string
-
threads
-
xd_mem
f
-
sigpipe
string
-
nothreads
-
fs
f
-
threads
-
nothreads
-
gaps
n
-
grow
n
-
fs
f
-
gaps
n
-
fuzz
n
-
debug_tiles
-
grow
n
-
fuzz
n
-
snapfb
-
rawfb
string
-
debug_tiles
-
snapfb
-
pipeinput
cmd
-
gui
[
gui
-
opts
]
-
rawfb
string
-
pipeinput
cmd
-
remote
command
-
query
variable
-
gui
[
gui
-
opts
]
-
remote
command
-
sync
-
noremote
-
query
variable
-
sync
-
yesremote
-
unsafe
-
noremote
-
yesremote
-
safer
-
privremote
-
unsafe
-
safer
-
nocmds
-
deny_all
-
privremote
-
nocmds
-
deny_all
libvncserver
options
:
libvncserver
options
:
-
rfbport
port
TCP
port
for
RFB
protocol
-
rfbport
port
TCP
port
for
RFB
protocol
...
@@ -4358,7 +4358,7 @@ libvncserver options:
...
@@ -4358,7 +4358,7 @@ libvncserver options:
% x11vnc -help
% x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-0
5-30
x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-0
6-03
Typical usage is:
Typical usage is:
...
@@ -4494,18 +4494,21 @@ Options:
...
@@ -4494,18 +4494,21 @@ Options:
the notation "m/n" may be used to denote fractions
the notation "m/n" may be used to denote fractions
exactly, e.g. -scale 2/3
exactly, e.g. -scale 2/3
Scaling Options: can be added after "fraction"
Scaling Options: can be added after "fraction" via
via ":", to supply multiple ":" options use
":", to supply multiple ":" options use commas. If
commas. If you just want a quick, rough scaling
you just want a quick, rough scaling without blending,
without blending, append ":nb" to "fraction"
append ":nb" to "fraction" (e.g. -scale 1/3:nb).
(e.g. -scale 1/3:nb). No blending is the default
No blending is the default for 8bpp indexed color, to
for 8bpp indexed color, to force blending for this
force blending for this case use ":fb". By default
case use ":fb". For compatibility with vncviewers
-scrollcopyrect and -wirecopyrect are disabled under
-scale, to enable them use ":cr".
More esoteric options: for compatibility with vncviewers
the scaled width is adjusted to be a multiple of 4:
the scaled width is adjusted to be a multiple of 4:
to disable this use ":n4".
More esoteric options:
to disable this use ":n4".
":in" use interpolation
":in" use interpolation scheme even when shrinking,
scheme even when shrinking, ":pad", pad scaled width
":pad", pad scaled width and height to be multiples
and height to be multiples of scaling denominator
of scaling denominator
(e.g. 3 for 2/3).
(e.g. 3 for 2/3).
-scale_cursor frac By default if -scale is supplied the cursor shape is
-scale_cursor frac By default if -scale is supplied the cursor shape is
scaled by the same factor. Depending on your usage,
scaled by the same factor. Depending on your usage,
...
@@ -5174,7 +5177,8 @@ Options:
...
@@ -5174,7 +5177,8 @@ Options:
Note: there can be painting errors when using -scale
Note: there can be painting errors when using -scale
so CopyRect is skipped when scaling unless you specify
so CopyRect is skipped when scaling unless you specify
-wirecopyrect on the command line or by remote-control.
"
-
wirecopyrect
always
" on the command line or by
remote-control. Or you can also use "
-
scale
xxx
:
cr
"
-debug_wireframe Turn on debugging info printout for the wireframe
-debug_wireframe Turn on debugging info printout for the wireframe
heuristics. "
-
dwf
" is an alias. Specify multiple
heuristics. "
-
dwf
" is an alias. Specify multiple
...
@@ -5222,10 +5226,10 @@ Options:
...
@@ -5222,10 +5226,10 @@ Options:
try it in response to mouse events only, "
always
"
try it in response to mouse events only, "
always
"
means to do both. Default: "
always
"
means to do both. Default: "
always
"
Note: there can be painting errors when using
Note: there can be painting errors when using
-scale
-scale so CopyRect is skipped when scaling unless
so CopyRect is skipped when scaling unless you specify
you specify -scrollcopyrect on the command line or
"
-
scrollcopyrect
always
" on the command line or by
by remote-control.
remote-control. You can also use "
-
scale
xxx
:
cr
"
-scr_area n Set the minimum area in pixels for a rectangle
-scr_area n Set the minimum area in pixels for a rectangle
to be considered for the -scrollcopyrect detection
to be considered for the -scrollcopyrect detection
...
@@ -5364,6 +5368,30 @@ Options:
...
@@ -5364,6 +5368,30 @@ Options:
updating the scroll window without updating the rest
updating the scroll window without updating the rest
of the screen.
of the screen.
-fixscreen string Periodically "
repair
" the screen based on settings
in "
string
". Hopefully you won't need this option,
it is intended for cases when the -scrollcopyrect or
-wirecopyrect features leave too many painting errors,
but it can be used for any scenario. This option
periodically performs costly operations and so
interactive response may be reduced when it is on.
The 3 Alt_L's in a row described under -scrollcopyrect
can be used instead to manually request a screen repaint
when it is needed.
"
string
" is a comma separated list of one or more
of the following: "
V
=
t
", "
C
=
t
", and "
X
=
t
".
In these "
t
" stands for a time in seconds (it is
a floating point even though one should usually use
values > 2 to avoid wasting resources). V sets how
frequently the entire screen should be sent to viewers
(it is like the 3 Alt_L's). C sets how long after a
CopyRect the full screen should be repainted. X sets
how frequently to reread the full X11 framebuffer from
the X server and push it out to connected viewers.
Use of X should be rare. Examples: -fixscreen V=10
-fixscreen C=10
-debug_scroll Turn on debugging info printout for the scroll
-debug_scroll Turn on debugging info printout for the scroll
heuristics. "
-
ds
" is an alias. Specify it multiple
heuristics. "
-
ds
" is an alias. Specify it multiple
times for more output.
times for more output.
...
@@ -5849,6 +5877,7 @@ Options:
...
@@ -5849,6 +5877,7 @@ Options:
scr_term:list set -scr_term to "
list
"
scr_term:list set -scr_term to "
list
"
scr_keyrepeat:str set -scr_keyrepeat to "
str
"
scr_keyrepeat:str set -scr_keyrepeat to "
str
"
scr_parms:str set -scr_parms parameters.
scr_parms:str set -scr_parms parameters.
fixscreen:str set -fixscreen to "
str
".
noxrecord disable all use of RECORD extension.
noxrecord disable all use of RECORD extension.
xrecord enable use of RECORD extension.
xrecord enable use of RECORD extension.
pointer_mode:n set -pointer_mode to n. same as "
pm
"
pointer_mode:n set -pointer_mode to n. same as "
pm
"
...
@@ -5974,20 +6003,21 @@ Options:
...
@@ -5974,20 +6003,21 @@ Options:
wireframe wf nowireframe nowf wirecopyrect wcr
wireframe wf nowireframe nowf wirecopyrect wcr
nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys
nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys
scr_term scr_keyrepeat scr_parms scrollcopyrect scr
scr_term scr_keyrepeat scr_parms scrollcopyrect scr
noscrollcopyrect noscr noxrecord xrecord pointer_mode
noscrollcopyrect noscr fixscreen noxrecord xrecord
pm input_skip input client_input speeds debug_pointer dp
pointer_mode pm input_skip input client_input speeds
nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
debug_pointer dp nodebug_pointer nodp debug_keyboard
nodk deferupdate defer wait_ui wait_bog nowait_bog wait
dk nodebug_keyboard nodk deferupdate defer wait_ui
readtimeout nap nonap sb screen_blank fs gaps grow fuzz
wait_bog nowait_bog wait readtimeout nap nonap sb
snapfb nosnapfb rawfb progressive rfbport http nohttp
screen_blank fs gaps grow fuzz snapfb nosnapfb
httpport httpdir enablehttpproxy noenablehttpproxy
rawfb progressive rfbport http nohttp httpport
alwaysshared noalwaysshared nevershared noalwaysshared
httpdir enablehttpproxy noenablehttpproxy alwaysshared
dontdisconnect nodontdisconnect desktop debug_xevents
noalwaysshared nevershared noalwaysshared dontdisconnect
nodebug_xevents debug_xevents debug_xdamage
nodontdisconnect desktop debug_xevents nodebug_xevents
nodebug_xdamage debug_xdamage debug_wireframe
debug_xevents debug_xdamage nodebug_xdamage
nodebug_wireframe debug_wireframe debug_scroll
debug_xdamage debug_wireframe nodebug_wireframe
nodebug_scroll debug_scroll debug_tiles dbt
debug_wireframe debug_scroll nodebug_scroll debug_scroll
nodebug_tiles nodbt debug_tiles dbg nodbg noremote
debug_tiles dbt nodebug_tiles nodbt debug_tiles dbg
nodbg noremote
aro= display vncdisplay desktopname http_url auth
aro= display vncdisplay desktopname http_url auth
users rootshift clipshift scale_str scaled_x scaled_y
users rootshift clipshift scale_str scaled_x scaled_y
...
...
x11vnc/tkx11vnc
View file @
89148d77
...
@@ -103,6 +103,7 @@ Screen
...
@@ -103,6 +103,7 @@ Screen
=DRA refresh
=DRA refresh
=RA reset
=RA reset
=DRA blacken
=DRA blacken
fixscreen:
-- D
-- D
id:
id:
sid:
sid:
...
...
x11vnc/tkx11vnc.h
View file @
89148d77
...
@@ -109,6 +109,7 @@
...
@@ -109,6 +109,7 @@
" =DRA refresh
\n
"
" =DRA refresh
\n
"
" =RA reset
\n
"
" =RA reset
\n
"
" =DRA blacken
\n
"
" =DRA blacken
\n
"
" fixscreen:
\n
"
" -- D
\n
"
" -- D
\n
"
" id:
\n
"
" id:
\n
"
" sid:
\n
"
" sid:
\n
"
...
...
x11vnc/x11vnc.1
View file @
89148d77
.\" This file was automatically generated from x11vnc -help output.
.\" This file was automatically generated from x11vnc -help output.
.TH X11VNC "1" "
May
2005" "x11vnc " "User Commands"
.TH X11VNC "1" "
June
2005" "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.7.2, lastmod: 2005-0
5-30
version: 0.7.2, lastmod: 2005-0
6-03
.SH SYNOPSIS
.SH SYNOPSIS
.B x11vnc
.B x11vnc
[OPTION]...
[OPTION]...
...
@@ -185,18 +185,21 @@ is taken as a floating point number, alternatively
...
@@ -185,18 +185,21 @@ is taken as a floating point number, alternatively
the notation "m/n" may be used to denote fractions
the notation "m/n" may be used to denote fractions
exactly, e.g. \fB-scale\fR 2/3
exactly, e.g. \fB-scale\fR 2/3
.IP
.IP
Scaling Options: can be added after \fIfraction\fR
Scaling Options: can be added after \fIfraction\fR via
via ":", to supply multiple ":" options use
":", to supply multiple ":" options use commas. If
commas. If you just want a quick, rough scaling
you just want a quick, rough scaling without blending,
without blending, append ":nb" to \fIfraction\fR
append ":nb" to \fIfraction\fR (e.g. \fB-scale\fR 1/3:nb).
(e.g. \fB-scale\fR 1/3:nb). No blending is the default
No blending is the default for 8bpp indexed color, to
for 8bpp indexed color, to force blending for this
force blending for this case use ":fb". By default
case use ":fb". For compatibility with vncviewers
\fB-scrollcopyrect\fR and \fB-wirecopyrect\fR are disabled under
\fB-scale,\fR to enable them use ":cr".
.IP
More esoteric options: for compatibility with vncviewers
the scaled width is adjusted to be a multiple of 4:
the scaled width is adjusted to be a multiple of 4:
to disable this use ":n4".
More esoteric options:
to disable this use ":n4".
":in" use interpolation
":in" use interpolation scheme even when shrinking,
scheme even when shrinking, ":pad", pad scaled width
":pad", pad scaled width and height to be multiples
and height to be multiples of scaling denominator
of scaling denominator
(e.g. 3 for 2/3).
(e.g. 3 for 2/3).
.PP
.PP
\fB-scale_cursor\fR \fIfrac\fR
\fB-scale_cursor\fR \fIfrac\fR
.IP
.IP
...
@@ -1081,7 +1084,8 @@ in, but helps on a slow link). Default: "always"
...
@@ -1081,7 +1084,8 @@ in, but helps on a slow link). Default: "always"
.IP
.IP
Note: there can be painting errors when using \fB-scale\fR
Note: there can be painting errors when using \fB-scale\fR
so CopyRect is skipped when scaling unless you specify
so CopyRect is skipped when scaling unless you specify
\fB-wirecopyrect\fR on the command line or by remote-control.
"\fB-wirecopyrect\fR \fIalways\fR" on the command line or by
remote-control. Or you can also use "\fB-scale\fR \fIxxx:cr\fR"
.PP
.PP
\fB-debug_wireframe\fR
\fB-debug_wireframe\fR
.IP
.IP
...
@@ -1133,10 +1137,10 @@ in response to keystrokes only, "mouse" means to
...
@@ -1133,10 +1137,10 @@ in response to keystrokes only, "mouse" means to
try it in response to mouse events only, "always"
try it in response to mouse events only, "always"
means to do both. Default: "always"
means to do both. Default: "always"
.IP
.IP
Note: there can be painting errors when using
Note: there can be painting errors when using
\fB-scale\fR
\fB-scale\fR so CopyRect is skipped when scaling unless
so CopyRect is skipped when scaling unless you specify
you specify \fB-scrollcopyrect\fR on the command line or
"\fB-scrollcopyrect\fR \fIalways\fR" on the command line or by
by remote-control.
remote-control. You can also use "\fB-scale\fR \fIxxx:cr\fR"
.PP
.PP
\fB-scr_area\fR \fIn\fR
\fB-scr_area\fR \fIn\fR
.IP
.IP
...
@@ -1290,6 +1294,32 @@ mouse scrolls). s5 is the maximum time to spend just
...
@@ -1290,6 +1294,32 @@ mouse scrolls). s5 is the maximum time to spend just
updating the scroll window without updating the rest
updating the scroll window without updating the rest
of the screen.
of the screen.
.PP
.PP
\fB-fixscreen\fR \fIstring\fR
.IP
Periodically "repair" the screen based on settings
in \fIstring\fR. Hopefully you won't need this option,
it is intended for cases when the \fB-scrollcopyrect\fR or
\fB-wirecopyrect\fR features leave too many painting errors,
but it can be used for any scenario. This option
periodically performs costly operations and so
interactive response may be reduced when it is on.
The 3 Alt_L's in a row described under \fB-scrollcopyrect\fR
can be used instead to manually request a screen repaint
when it is needed.
.IP
\fIstring\fR is a comma separated list of one or more
of the following: "V=t", "C=t", and "X=t".
In these "t" stands for a time in seconds (it is
a floating point even though one should usually use
values > 2 to avoid wasting resources). V sets how
frequently the entire screen should be sent to viewers
(it is like the 3 Alt_L's). C sets how long after a
CopyRect the full screen should be repainted. X sets
how frequently to reread the full X11 framebuffer from
the X server and push it out to connected viewers.
Use of X should be rare. Examples: \fB-fixscreen\fR V=10
\fB-fixscreen\fR C=10
.PP
\fB-debug_scroll\fR
\fB-debug_scroll\fR
.IP
.IP
Turn on debugging info printout for the scroll
Turn on debugging info printout for the scroll
...
@@ -1986,6 +2016,8 @@ scr_keyrepeat:str set \fB-scr_keyrepeat\fR to "str"
...
@@ -1986,6 +2016,8 @@ scr_keyrepeat:str set \fB-scr_keyrepeat\fR to "str"
.IP
.IP
scr_parms:str set \fB-scr_parms\fR parameters.
scr_parms:str set \fB-scr_parms\fR parameters.
.IP
.IP
fixscreen:str set \fB-fixscreen\fR to "str".
.IP
noxrecord disable all use of RECORD extension.
noxrecord disable all use of RECORD extension.
.IP
.IP
xrecord enable use of RECORD extension.
xrecord enable use of RECORD extension.
...
@@ -2182,20 +2214,21 @@ noxwarp buttonmap dragging nodragging wireframe_mode
...
@@ -2182,20 +2214,21 @@ noxwarp buttonmap dragging nodragging wireframe_mode
wireframe wf nowireframe nowf wirecopyrect wcr
wireframe wf nowireframe nowf wirecopyrect wcr
nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys
nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys
scr_term scr_keyrepeat scr_parms scrollcopyrect scr
scr_term scr_keyrepeat scr_parms scrollcopyrect scr
noscrollcopyrect noscr noxrecord xrecord pointer_mode
noscrollcopyrect noscr fixscreen noxrecord xrecord
pm input_skip input client_input speeds debug_pointer dp
pointer_mode pm input_skip input client_input speeds
nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
debug_pointer dp nodebug_pointer nodp debug_keyboard
nodk deferupdate defer wait_ui wait_bog nowait_bog wait
dk nodebug_keyboard nodk deferupdate defer wait_ui
readtimeout nap nonap sb screen_blank fs gaps grow fuzz
wait_bog nowait_bog wait readtimeout nap nonap sb
snapfb nosnapfb rawfb progressive rfbport http nohttp
screen_blank fs gaps grow fuzz snapfb nosnapfb
httpport httpdir enablehttpproxy noenablehttpproxy
rawfb progressive rfbport http nohttp httpport
alwaysshared noalwaysshared nevershared noalwaysshared
httpdir enablehttpproxy noenablehttpproxy alwaysshared
dontdisconnect nodontdisconnect desktop debug_xevents
noalwaysshared nevershared noalwaysshared dontdisconnect
nodebug_xevents debug_xevents debug_xdamage
nodontdisconnect desktop debug_xevents nodebug_xevents
nodebug_xdamage debug_xdamage debug_wireframe
debug_xevents debug_xdamage nodebug_xdamage
nodebug_wireframe debug_wireframe debug_scroll
debug_xdamage debug_wireframe nodebug_wireframe
nodebug_scroll debug_scroll debug_tiles dbt
debug_wireframe debug_scroll nodebug_scroll debug_scroll
nodebug_tiles nodbt debug_tiles dbg nodbg noremote
debug_tiles dbt nodebug_tiles nodbt debug_tiles dbg
nodbg noremote
.IP
.IP
aro= display vncdisplay desktopname http_url auth
aro= display vncdisplay desktopname http_url auth
users rootshift clipshift scale_str scaled_x scaled_y
users rootshift clipshift scale_str scaled_x scaled_y
...
...
x11vnc/x11vnc.c
View file @
89148d77
...
@@ -372,7 +372,7 @@ double xdamage_scheduled_mark = 0.0;
...
@@ -372,7 +372,7 @@ double xdamage_scheduled_mark = 0.0;
sraRegionPtr
xdamage_scheduled_mark_region
=
NULL
;
sraRegionPtr
xdamage_scheduled_mark_region
=
NULL
;
/* date +'lastmod: %Y-%m-%d' */
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.7.2 lastmod: 2005-0
5-30
";
char
lastmod
[]
=
"0.7.2 lastmod: 2005-0
6-03
"
;
int
hack_val
=
0
;
int
hack_val
=
0
;
/* X display info */
/* X display info */
...
@@ -498,6 +498,8 @@ double last_pointer_time = 0.0;
...
@@ -498,6 +498,8 @@ double last_pointer_time = 0.0;
double
last_pointer_click_time
=
0
.
0
;
double
last_pointer_click_time
=
0
.
0
;
double
last_pointer_motion_time
=
0
.
0
;
double
last_pointer_motion_time
=
0
.
0
;
double
last_key_to_button_remap_time
=
0
.
0
;
double
last_key_to_button_remap_time
=
0
.
0
;
double
last_copyrect
=
0
.
0
;
double
last_copyrect_fix
=
0
.
0
;
double
servertime_diff
=
0
.
0
;
double
servertime_diff
=
0
.
0
;
double
x11vnc_start
=
0
.
0
;
double
x11vnc_start
=
0
.
0
;
...
@@ -643,6 +645,7 @@ void do_button_mask_change(int, int);
...
@@ -643,6 +645,7 @@ void do_button_mask_change(int, int);
void
parse_wireframe
(
void
);
void
parse_wireframe
(
void
);
void
parse_scroll_copyrect
(
void
);
void
parse_scroll_copyrect
(
void
);
void
parse_fixscreen
(
void
);
void
set_wirecopyrect_mode
(
char
*
);
void
set_wirecopyrect_mode
(
char
*
);
void
set_scrollcopyrect_mode
(
char
*
);
void
set_scrollcopyrect_mode
(
char
*
);
void
initialize_scroll_matches
(
void
);
void
initialize_scroll_matches
(
void
);
...
@@ -979,6 +982,11 @@ char *scroll_term_str0 =
...
@@ -979,6 +982,11 @@ char *scroll_term_str0 =
"term"
"term"
;
;
char
*
screen_fixup_str
=
NULL
;
double
screen_fixup_V
=
0
.
0
;
double
screen_fixup_C
=
0
.
0
;
double
screen_fixup_X
=
0
.
0
;
#ifndef NOREPEAT
#ifndef NOREPEAT
#define NOREPEAT 1
#define NOREPEAT 1
#endif
#endif
...
@@ -12101,7 +12109,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
...
@@ -12101,7 +12109,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
zero_fb
(
x1
,
y1
,
x2
,
y2
);
zero_fb
(
x1
,
y1
,
x2
,
y2
);
if
(
mark
)
{
if
(
mark
)
{
mark_rect_as_modified(x1, y1, x2, y2,
1
);
mark_rect_as_modified
(
x1
,
y1
,
x2
,
y2
,
0
);
}
}
push_sleep
(
4
);
push_sleep
(
4
);
}
}
...
@@ -13986,6 +13994,22 @@ char *process_remote_cmd(char *cmd, int stringonly) {
...
@@ -13986,6 +13994,22 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog
(
"remote_cmd: changed -scrollcopyrect mode "
rfbLog
(
"remote_cmd: changed -scrollcopyrect mode "
"to: %s
\n
"
,
NONUL
(
scroll_copyrect
));
"to: %s
\n
"
,
NONUL
(
scroll_copyrect
));
}
else
if
(
strstr
(
p
,
"fixscreen"
)
==
p
)
{
COLON_CHECK
(
"fixscreen:"
)
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s%s%s"
,
p
,
co
,
NONUL
(
screen_fixup_str
));
goto
qry
;
}
p
+=
strlen
(
"fixscreen:"
);
if
(
screen_fixup_str
)
{
free
(
screen_fixup_str
);
}
screen_fixup_str
=
strdup
(
p
);
parse_fixscreen
();
rfbLog
(
"remote_cmd: set -fixscreen %s.
\n
"
,
NONUL
(
screen_fixup_str
));
}
else
if
(
!
strcmp
(
p
,
"noxrecord"
))
{
}
else
if
(
!
strcmp
(
p
,
"noxrecord"
))
{
int
orig
=
noxrecord
;
int
orig
=
noxrecord
;
if
(
query
)
{
if
(
query
)
{
...
@@ -18256,6 +18280,11 @@ void parse_scale_string(char *str, double *factor, int *scaling, int *blend,
...
@@ -18256,6 +18280,11 @@ void parse_scale_string(char *str, double *factor, int *scaling, int *blend,
if
(
strstr
(
p
+
1
,
"pad"
)
!=
NULL
)
{
if
(
strstr
(
p
+
1
,
"pad"
)
!=
NULL
)
{
*
pad
=
1
;
*
pad
=
1
;
}
}
if
(
strstr
(
p
+
1
,
"cr"
)
!=
NULL
)
{
/* global */
got_scrollcopyrect
=
1
;
got_wirecopyrect
=
1
;
}
*
p
=
'\0'
;
*
p
=
'\0'
;
}
}
if
(
strchr
(
tstr
,
'.'
)
!=
NULL
)
{
if
(
strchr
(
tstr
,
'.'
)
!=
NULL
)
{
...
@@ -19783,7 +19812,7 @@ void push_black_screen(int n) {
...
@@ -19783,7 +19812,7 @@ void push_black_screen(int n) {
return
;
return
;
}
}
zero_fb
(
0
,
0
,
dpy_x
,
dpy_y
);
zero_fb
(
0
,
0
,
dpy_x
,
dpy_y
);
mark_rect_as_modified(0, 0, dpy_x, dpy_y,
1
);
mark_rect_as_modified
(
0
,
0
,
dpy_x
,
dpy_y
,
0
);
push_sleep
(
n
);
push_sleep
(
n
);
}
}
...
@@ -19792,7 +19821,7 @@ void refresh_screen(int push) {
...
@@ -19792,7 +19821,7 @@ void refresh_screen(int push) {
if
(
!
screen
)
{
if
(
!
screen
)
{
return
;
return
;
}
}
mark_rect_as_modified(0, 0, dpy_x, dpy_y,
1
);
mark_rect_as_modified
(
0
,
0
,
dpy_x
,
dpy_y
,
0
);
for
(
i
=
0
;
i
<
push
;
i
++
)
{
for
(
i
=
0
;
i
<
push
;
i
++
)
{
rfbPE
(
-
1
);
rfbPE
(
-
1
);
}
}
...
@@ -22885,6 +22914,38 @@ void parse_scroll_copyrect(void) {
...
@@ -22885,6 +22914,38 @@ void parse_scroll_copyrect(void) {
parse_scroll_copyrect_str
(
scroll_copyrect_str
);
parse_scroll_copyrect_str
(
scroll_copyrect_str
);
}
}
void
parse_fixscreen
(
void
)
{
char
*
str
,
*
p
;
screen_fixup_V
=
0
.
0
;
screen_fixup_C
=
0
.
0
;
screen_fixup_X
=
0
.
0
;
if
(
!
screen_fixup_str
)
{
return
;
}
str
=
strdup
(
screen_fixup_str
);
p
=
strtok
(
str
,
","
);
while
(
p
)
{
double
t
;
if
(
*
p
==
'V'
&&
sscanf
(
p
,
"V=%lf"
,
&
t
)
==
1
)
{
screen_fixup_V
=
t
;
}
else
if
(
*
p
==
'C'
&&
sscanf
(
p
,
"C=%lf"
,
&
t
)
==
1
)
{
screen_fixup_C
=
t
;
}
else
if
(
*
p
==
'X'
&&
sscanf
(
p
,
"X=%lf"
,
&
t
)
==
1
)
{
screen_fixup_X
=
t
;
}
p
=
strtok
(
NULL
,
","
);
}
free
(
str
);
if
(
screen_fixup_V
<
0
.
0
)
screen_fixup_V
=
0
.
0
;
if
(
screen_fixup_C
<
0
.
0
)
screen_fixup_C
=
0
.
0
;
if
(
screen_fixup_X
<
0
.
0
)
screen_fixup_X
=
0
.
0
;
}
/*
/*
WIREFRAME_PARMS "0xff,2,0,30+6+6+6,0.05+0.3+2.0,8"
WIREFRAME_PARMS "0xff,2,0,30+6+6+6,0.05+0.3+2.0,8"
shade,linewidth,percent,T+B+L+R,t1+t2+t3
shade,linewidth,percent,T+B+L+R,t1+t2+t3
...
@@ -23732,7 +23793,7 @@ if (db) dtime0(&tm);
...
@@ -23732,7 +23793,7 @@ if (db) dtime0(&tm);
}
}
if
(
mark
)
{
if
(
mark
)
{
mark_rect_as_modified(xmin, ymin, xmax, ymax,
1
);
mark_rect_as_modified
(
xmin
,
ymin
,
xmax
,
ymax
,
0
);
}
}
if
(
db
)
{
if
(
db
)
{
...
@@ -24124,21 +24185,21 @@ if (db > 1) fprintf(stderr, "------------ got: %d x: %4d y: %3d"
...
@@ -24124,21 +24185,21 @@ if (db > 1) fprintf(stderr, "------------ got: %d x: %4d y: %3d"
* ignore for now... probably will make some apps
* ignore for now... probably will make some apps
* act very strangely.
* act very strangely.
*/
*/
if (ypad) {
if
(
ypad
)
{
if (ypad < 0) {
if
(
ypad
<
0
)
{
if (h > -ypad) {
if
(
h
>
-
ypad
)
{
h += ypad;
h
+=
ypad
;
} else {
}
else
{
ypad = 0;
ypad
=
0
;
}
}
} else {
}
else
{
if (h > ypad) {
if
(
h
>
ypad
)
{
y += ypad;
y
+=
ypad
;
} else {
}
else
{
ypad = 0;
ypad
=
0
;
}
}
}
}
}
}
if
(
try_copyrect
(
frame
,
x
,
y
,
w
,
h
,
dx
,
dy
,
&
obscured
,
if
(
try_copyrect
(
frame
,
x
,
y
,
w
,
h
,
dx
,
dy
,
&
obscured
,
tmpregion
,
waittime
))
{
tmpregion
,
waittime
))
{
...
@@ -24164,14 +24225,14 @@ if (0) fprintf(stderr, " try_copyrect dt: %.4f\n", dt);
...
@@ -24164,14 +24225,14 @@ if (0) fprintf(stderr, " try_copyrect dt: %.4f\n", dt);
sraRgnAnd
(
backfill
,
whole
);
sraRgnAnd
(
backfill
,
whole
);
}
}
if (ypad) {
if
(
ypad
)
{
if (ypad < 0) {
if
(
ypad
<
0
)
{
ny += ypad;
ny
+=
ypad
;
nh -= ypad;
nh
-=
ypad
;
} else {
}
else
{
;
;
}
}
}
}
tmpregion
=
sraRgnCreateRect
(
nx
,
ny
,
nx
+
nw
,
ny
+
nh
);
tmpregion
=
sraRgnCreateRect
(
nx
,
ny
,
nx
+
nw
,
ny
+
nh
);
sraRgnAnd
(
tmpregion
,
whole
);
sraRgnAnd
(
tmpregion
,
whole
);
...
@@ -24271,6 +24332,21 @@ if (db && bdpush) fprintf(stderr, "BDPUSH-TIME: 0x%lx\n", xrecord_wm_window);
...
@@ -24271,6 +24332,21 @@ if (db && bdpush) fprintf(stderr, "BDPUSH-TIME: 0x%lx\n", xrecord_wm_window);
fb_push
();
fb_push
();
dt
=
dtime
(
&
tm
);
dt
=
dtime
(
&
tm
);
if
(
0
)
fprintf
(
stderr
,
" fb_push dt: %.4f"
,
dt
);
if
(
0
)
fprintf
(
stderr
,
" fb_push dt: %.4f"
,
dt
);
if
(
scaling
)
{
static
double
last_time
=
0
.
0
;
double
now
=
dnow
(),
delay
=
0
.
35
;
if
(
now
>
last_time
+
delay
)
{
int
s
=
2
;
int
x1
=
nfix
(
x0
-
s
,
dpy_x
);
int
y1
=
nfix
(
y0
-
s
,
dpy_y
);
int
x2
=
nfix
(
x0
+
w0
+
s
,
dpy_x
+
1
);
int
y2
=
nfix
(
y0
+
h0
+
s
,
dpy_y
+
1
);
scale_and_mark_rect
(
x1
,
y1
,
x2
,
y2
);
last_time
=
now
;
last_copyrect_fix
=
now
;
}
}
}
}
sraRgnDestroy
(
backfill
);
sraRgnDestroy
(
backfill
);
...
@@ -24312,6 +24388,8 @@ void do_copyregion(sraRegionPtr region, int dx, int dy) {
...
@@ -24312,6 +24388,8 @@ void do_copyregion(sraRegionPtr region, int dx, int dy) {
int
req
,
mod
,
cpy
,
ncli
;
int
req
,
mod
,
cpy
,
ncli
;
char
*
dst
,
*
src
;
char
*
dst
,
*
src
;
last_copyrect
=
dnow
();
if
(
!
scaling
||
rfb_fb
==
main_fb
)
{
if
(
!
scaling
||
rfb_fb
==
main_fb
)
{
/* normal case */
/* normal case */
get_client_regions
(
&
req
,
&
mod
,
&
cpy
,
&
ncli
);
get_client_regions
(
&
req
,
&
mod
,
&
cpy
,
&
ncli
);
...
@@ -24327,7 +24405,7 @@ if (debug_scroll > 1) fprintf(stderr, ">>>-rfbDoCopyRect req: %d mod: %d cpy: %d
...
@@ -24327,7 +24405,7 @@ if (debug_scroll > 1) fprintf(stderr, ">>>-rfbDoCopyRect req: %d mod: %d cpy: %d
/* rarer case, we need to call rfbDoCopyRect with scaled xy */
/* rarer case, we need to call rfbDoCopyRect with scaled xy */
stride
=
dpy_x
*
Bpp
;
stride
=
dpy_x
*
Bpp
;
iter = sraRgnGet
Iterator(region
);
iter
=
sraRgnGet
ReverseIterator
(
region
,
dx
<
0
,
dy
<
0
);
while
(
sraRgnIteratorNext
(
iter
,
&
rect
))
{
while
(
sraRgnIteratorNext
(
iter
,
&
rect
))
{
int
j
;
int
j
;
...
@@ -24349,7 +24427,7 @@ if (debug_scroll > 1) fprintf(stderr, ">>>-rfbDoCopyRect req: %d mod: %d cpy: %d
...
@@ -24349,7 +24427,7 @@ if (debug_scroll > 1) fprintf(stderr, ">>>-rfbDoCopyRect req: %d mod: %d cpy: %d
}
else
{
}
else
{
dst
+=
(
y2
-
y1
-
1
)
*
stride
;
dst
+=
(
y2
-
y1
-
1
)
*
stride
;
src
+=
(
y2
-
y1
-
1
)
*
stride
;
src
+=
(
y2
-
y1
-
1
)
*
stride
;
for (j=y2-1; j>y1; j--) {
for
(
j
=
y2
-
1
;
j
>
=
y1
;
j
--
)
{
memmove
(
dst
,
src
,
w
);
memmove
(
dst
,
src
,
w
);
dst
-=
stride
;
dst
-=
stride
;
src
-=
stride
;
src
-=
stride
;
...
@@ -24596,6 +24674,17 @@ void set_xdamage_mark(int x, int y, int w, int h) {
...
@@ -24596,6 +24674,17 @@ void set_xdamage_mark(int x, int y, int w, int h) {
sraRgnDestroy
(
region
);
sraRgnDestroy
(
region
);
}
}
int
repeat_check
(
double
last_key_scroll
)
{
int
repeating
;
double
rate
=
typing_rate
(
0
.
0
,
&
repeating
);
double
now
=
dnow
(),
delay
=
0
.
5
;
if
(
rate
>
2
.
0
&&
repeating
&&
now
>
last_key_scroll
+
delay
)
{
return
0
;
}
else
{
return
1
;
}
}
int
check_xrecord_keys
(
void
)
{
int
check_xrecord_keys
(
void
)
{
static
int
last_wx
,
last_wy
,
last_ww
,
last_wh
;
static
int
last_wx
,
last_wy
,
last_ww
,
last_wh
;
double
spin
=
0
.
0
,
tm
,
tnow
;
double
spin
=
0
.
0
,
tm
,
tnow
;
...
@@ -24609,8 +24698,9 @@ int check_xrecord_keys(void) {
...
@@ -24609,8 +24698,9 @@ int check_xrecord_keys(void) {
static
double
persist_start
=
0
.
0
;
static
double
persist_start
=
0
.
0
;
static
double
last_bdpush
=
0
.
0
;
static
double
last_bdpush
=
0
.
0
;
static
int
persist_count
=
0
;
static
int
persist_count
=
0
;
int
scroll_keysym
=
0
;
double
last_scroll
,
scroll_persist
=
scr_key_persist
;
double
last_scroll
,
scroll_persist
=
scr_key_persist
;
double spin_fac = 1.0, scroll_fac = 2.0;
double
spin_fac
=
1
.
0
,
scroll_fac
=
2
.
0
,
noscroll_fac
=
0
.
75
;
double
max_spin
,
max_long_spin
=
0
.
3
;
double
max_spin
,
max_long_spin
=
0
.
3
;
double
set_repeat_in
;
double
set_repeat_in
;
static
double
set_repeat
=
0
.
0
;
static
double
set_repeat
=
0
.
0
;
...
@@ -24644,6 +24734,8 @@ int check_xrecord_keys(void) {
...
@@ -24644,6 +24734,8 @@ int check_xrecord_keys(void) {
scroll_rep
=
scrollability
(
xrecord_ptr_window
,
SCR_NONE
)
+
1
;
scroll_rep
=
scrollability
(
xrecord_ptr_window
,
SCR_NONE
)
+
1
;
scroll_keysym
=
xrecord_scroll_keysym
(
last_rfb_keysym
);
max_spin
=
scr_key_time
;
max_spin
=
scr_key_time
;
if
(
set_repeat_in
>
0
.
0
&&
tnow
<
last_key_scroll
+
2
*
set_repeat_in
)
{
if
(
set_repeat_in
>
0
.
0
&&
tnow
<
last_key_scroll
+
2
*
set_repeat_in
)
{
...
@@ -24653,8 +24745,12 @@ int check_xrecord_keys(void) {
...
@@ -24653,8 +24745,12 @@ int check_xrecord_keys(void) {
}
else
if
(
tnow
<
last_key_to_button_remap_time
+
scroll_persist
)
{
}
else
if
(
tnow
<
last_key_to_button_remap_time
+
scroll_persist
)
{
/* mostly a hack I use for testing -remap key -> btn4/btn5 */
/* mostly a hack I use for testing -remap key -> btn4/btn5 */
max_spin
=
scroll_persist
;
max_spin
=
scroll_persist
;
} else if (xrecord_scroll_keysym(last_rfb_keysym)) {
}
else
if
(
scroll_keysym
)
{
spin_fac = scroll_fac;
if
(
repeat_check
(
last_key_scroll
))
{
spin_fac
=
scroll_fac
;
}
else
{
spin_fac
=
noscroll_fac
;
}
}
}
if
(
max_spin
>
max_long_spin
)
{
if
(
max_spin
>
max_long_spin
)
{
max_spin
=
max_long_spin
;
max_spin
=
max_long_spin
;
...
@@ -24706,7 +24802,11 @@ if (db) fprintf(stderr, "check_xrecord_keys: BEGIN LOOP: scr_ev_cnt: "
...
@@ -24706,7 +24802,11 @@ if (db) fprintf(stderr, "check_xrecord_keys: BEGIN LOOP: scr_ev_cnt: "
if
(
set_repeat_in
)
{
if
(
set_repeat_in
)
{
;
;
}
else
if
(
xrecord_scroll_keysym
(
last_rfb_keysym
))
{
}
else
if
(
xrecord_scroll_keysym
(
last_rfb_keysym
))
{
spin_fac = scroll_fac;
if
(
repeat_check
(
last_key_scroll
))
{
spin_fac
=
scroll_fac
;
}
else
{
spin_fac
=
noscroll_fac
;
}
}
}
if
(
0
||
db
)
fprintf
(
stderr
,
"check_xrecord: more keys: %.3f 0x%x "
if
(
0
||
db
)
fprintf
(
stderr
,
"check_xrecord: more keys: %.3f 0x%x "
" %.4f %s %s
\n
"
,
spin
,
last_rfb_keysym
,
last_rfb_keytime
-
x11vnc_start
,
" %.4f %s %s
\n
"
,
spin
,
last_rfb_keysym
,
last_rfb_keytime
-
x11vnc_start
,
...
@@ -25544,6 +25644,63 @@ int near_scrollbar_edge(int x, int y, int w, int h, int px, int py) {
...
@@ -25544,6 +25644,63 @@ int near_scrollbar_edge(int x, int y, int w, int h, int px, int py) {
return
near_edge
;
return
near_edge
;
}
}
void
check_fixscreen
(
void
)
{
double
now
=
dnow
();
int
didfull
=
0
,
db
=
0
;
if
(
!
client_count
)
{
return
;
}
if
(
screen_fixup_X
>
0
.
0
)
{
static
double
last
=
0
.
0
;
if
(
now
>
last
+
screen_fixup_X
)
{
if
(
db
)
rfbLog
(
"doing screen_fixup_X
\n
"
);
do_copy_screen
=
1
;
last
=
now
;
didfull
=
1
;
}
}
if
(
screen_fixup_V
>
0
.
0
)
{
static
double
last
=
0
.
0
;
if
(
now
>
last
+
screen_fixup_V
)
{
if
(
!
didfull
)
{
refresh_screen
(
0
);
if
(
db
)
rfbLog
(
"doing screen_fixup_V
\n
"
);
}
last
=
now
;
didfull
=
1
;
}
}
if
(
screen_fixup_C
>
0
.
0
)
{
static
double
last
=
0
.
0
;
if
(
last_copyrect_fix
<
last_copyrect
&&
now
>
last_copyrect
+
screen_fixup_C
)
{
if
(
!
didfull
)
{
refresh_screen
(
0
);
if
(
db
)
rfbLog
(
"doing screen_fixup_C
\n
"
);
}
last_copyrect_fix
=
now
;
last
=
now
;
didfull
=
1
;
}
}
if
(
scaling
&&
last_copyrect_fix
<
last_copyrect
)
{
static
double
last
=
0
.
0
;
double
delay
=
3
.
0
;
if
(
now
>
last
+
delay
)
{
if
(
!
didfull
)
{
scale_and_mark_rect
(
0
,
0
,
dpy_x
,
dpy_y
);
if
(
db
)
rfbLog
(
"doing scale screen_fixup
\n
"
);
}
last_copyrect_fix
=
now
;
last
=
now
;
didfull
=
1
;
}
}
}
/*
/*
* Applied just before any check_user_input() modes. Look for a
* Applied just before any check_user_input() modes. Look for a
* ButtonPress; find window it happened in; find the wm frame window
* ButtonPress; find window it happened in; find the wm frame window
...
@@ -25997,6 +26154,21 @@ if (db) fprintf(stderr, "send_copyrect: %d\n", sent_copyrect);
...
@@ -25997,6 +26154,21 @@ if (db) fprintf(stderr, "send_copyrect: %d\n", sent_copyrect);
}
else
{
}
else
{
fb_push_wait
(
0
.
1
,
FB_COPY
);
fb_push_wait
(
0
.
1
,
FB_COPY
);
}
}
if
(
scaling
)
{
static
double
last_time
=
0
.
0
;
double
now
=
dnow
(),
delay
=
0
.
35
;
if
(
now
>
last_time
+
delay
)
{
int
s
=
2
;
int
x1
=
nfix
(
x
-
s
,
dpy_x
);
int
y1
=
nfix
(
y
-
s
,
dpy_y
);
int
x2
=
nfix
(
x
+
w
+
s
,
dpy_x
+
1
);
int
y2
=
nfix
(
y
+
h
+
s
,
dpy_y
+
1
);
scale_and_mark_rect
(
x1
,
y1
,
x2
,
y2
);
last_time
=
now
;
last_copyrect_fix
=
now
;
}
}
}
}
}
}
...
@@ -27479,6 +27651,7 @@ if (debug_scroll) fprintf(stderr, "watch_loop: LOOP-BACK: %d\n", ret);
...
@@ -27479,6 +27651,7 @@ if (debug_scroll) fprintf(stderr, "watch_loop: LOOP-BACK: %d\n", ret);
check_autorepeat
();
check_autorepeat
();
check_connect_inputs
();
check_connect_inputs
();
check_padded_fb
();
check_padded_fb
();
check_fixscreen
();
check_xdamage_state
();
check_xdamage_state
();
check_xrecord_reset
(
0
);
check_xrecord_reset
(
0
);
check_add_keysyms
();
check_add_keysyms
();
...
@@ -27719,18 +27892,21 @@ static void print_help(int mode) {
...
@@ -27719,18 +27892,21 @@ static void print_help(int mode) {
" the notation
\"
m/n
\"
may be used to denote fractions
\n
"
" the notation
\"
m/n
\"
may be used to denote fractions
\n
"
" exactly, e.g. -scale 2/3
\n
"
" exactly, e.g. -scale 2/3
\n
"
"
\n
"
"
\n
"
" Scaling Options: can be added after \"fraction\"\n"
" Scaling Options: can be added after
\"
fraction
\"
via
\n
"
" via \":\", to supply multiple \":\" options use\n"
"
\"
:
\"
, to supply multiple
\"
:
\"
options use commas. If
\n
"
" commas. If you just want a quick, rough scaling\n"
" you just want a quick, rough scaling without blending,
\n
"
" without blending, append \":nb\" to \"fraction\"\n"
" append
\"
:nb
\"
to
\"
fraction
\"
(e.g. -scale 1/3:nb).
\n
"
" (e.g. -scale 1/3:nb). No blending is the default\n"
" No blending is the default for 8bpp indexed color, to
\n
"
" for 8bpp indexed color, to force blending for this\n"
" force blending for this case use
\"
:fb
\"
. By default
\n
"
" case use \":fb\". For compatibility with vncviewers\n"
" -scrollcopyrect and -wirecopyrect are disabled under
\n
"
" -scale, to enable them use
\"
:cr
\"
.
\n
"
"
\n
"
" More esoteric options: for compatibility with vncviewers
\n
"
" the scaled width is adjusted to be a multiple of 4:
\n
"
" the scaled width is adjusted to be a multiple of 4:
\n
"
" to disable this use \":n4\".
More esoteric options:
\n"
" to disable this use
\"
:n4
\"
.
\"
:in
\"
use interpolation
\n
"
"
\":in\" use interpolation scheme even when shrinking,
\n"
"
scheme even when shrinking,
\"
:pad
\"
, pad scaled width
\n
"
"
\":pad\", pad scaled width and height to be multiples
\n"
"
and height to be multiples of scaling denominator
\n
"
"
of scaling denominator
(e.g. 3 for 2/3).\n"
" (e.g. 3 for 2/3).
\n
"
"
\n
"
"
\n
"
"-scale_cursor frac By default if -scale is supplied the cursor shape is
\n
"
"-scale_cursor frac By default if -scale is supplied the cursor shape is
\n
"
" scaled by the same factor. Depending on your usage,
\n
"
" scaled by the same factor. Depending on your usage,
\n
"
...
@@ -28411,7 +28587,8 @@ static void print_help(int mode) {
...
@@ -28411,7 +28587,8 @@ static void print_help(int mode) {
"
\n
"
"
\n
"
" Note: there can be painting errors when using -scale
\n
"
" Note: there can be painting errors when using -scale
\n
"
" so CopyRect is skipped when scaling unless you specify
\n
"
" so CopyRect is skipped when scaling unless you specify
\n
"
" -wirecopyrect on the command line or by remote-control.\n"
"
\"
-wirecopyrect always
\"
on the command line or by
\n
"
" remote-control. Or you can also use
\"
-scale xxx:cr
\"\n
"
"
\n
"
"
\n
"
"-debug_wireframe Turn on debugging info printout for the wireframe
\n
"
"-debug_wireframe Turn on debugging info printout for the wireframe
\n
"
" heuristics.
\"
-dwf
\"
is an alias. Specify multiple
\n
"
" heuristics.
\"
-dwf
\"
is an alias. Specify multiple
\n
"
...
@@ -28459,10 +28636,10 @@ static void print_help(int mode) {
...
@@ -28459,10 +28636,10 @@ static void print_help(int mode) {
" try it in response to mouse events only,
\"
always
\"\n
"
" try it in response to mouse events only,
\"
always
\"\n
"
" means to do both. Default:
\"
%s
\"\n
"
" means to do both. Default:
\"
%s
\"\n
"
"
\n
"
"
\n
"
" Note: there can be painting errors when using\n"
" Note: there can be painting errors when using
-scale
\n
"
"
-scale so CopyRect is skipped when scaling unless
\n"
"
so CopyRect is skipped when scaling unless you specify
\n
"
"
you specify -scrollcopyrect on the command line or
\n"
"
\"
-scrollcopyrect always
\"
on the command line or by
\n
"
"
by remote-control.
\n"
"
remote-control. You can also use
\"
-scale xxx:cr
\"
\n
"
"
\n
"
"
\n
"
"-scr_area n Set the minimum area in pixels for a rectangle
\n
"
"-scr_area n Set the minimum area in pixels for a rectangle
\n
"
" to be considered for the -scrollcopyrect detection
\n
"
" to be considered for the -scrollcopyrect detection
\n
"
...
@@ -28601,6 +28778,30 @@ static void print_help(int mode) {
...
@@ -28601,6 +28778,30 @@ static void print_help(int mode) {
" updating the scroll window without updating the rest
\n
"
" updating the scroll window without updating the rest
\n
"
" of the screen.
\n
"
" of the screen.
\n
"
"
\n
"
"
\n
"
"-fixscreen string Periodically
\"
repair
\"
the screen based on settings
\n
"
" in
\"
string
\"
. Hopefully you won't need this option,
\n
"
" it is intended for cases when the -scrollcopyrect or
\n
"
" -wirecopyrect features leave too many painting errors,
\n
"
" but it can be used for any scenario. This option
\n
"
" periodically performs costly operations and so
\n
"
" interactive response may be reduced when it is on.
\n
"
" The 3 Alt_L's in a row described under -scrollcopyrect
\n
"
" can be used instead to manually request a screen repaint
\n
"
" when it is needed.
\n
"
"
\n
"
"
\"
string
\"
is a comma separated list of one or more
\n
"
" of the following:
\"
V=t
\"
,
\"
C=t
\"
, and
\"
X=t
\"
.
\n
"
" In these
\"
t
\"
stands for a time in seconds (it is
\n
"
" a floating point even though one should usually use
\n
"
" values > 2 to avoid wasting resources). V sets how
\n
"
" frequently the entire screen should be sent to viewers
\n
"
" (it is like the 3 Alt_L's). C sets how long after a
\n
"
" CopyRect the full screen should be repainted. X sets
\n
"
" how frequently to reread the full X11 framebuffer from
\n
"
" the X server and push it out to connected viewers.
\n
"
" Use of X should be rare. Examples: -fixscreen V=10
\n
"
" -fixscreen C=10
\n
"
"
\n
"
"-debug_scroll Turn on debugging info printout for the scroll
\n
"
"-debug_scroll Turn on debugging info printout for the scroll
\n
"
" heuristics.
\"
-ds
\"
is an alias. Specify it multiple
\n
"
" heuristics.
\"
-ds
\"
is an alias. Specify it multiple
\n
"
" times for more output.
\n
"
" times for more output.
\n
"
...
@@ -29093,6 +29294,7 @@ static void print_help(int mode) {
...
@@ -29093,6 +29294,7 @@ static void print_help(int mode) {
" scr_term:list set -scr_term to
\"
list
\"\n
"
" scr_term:list set -scr_term to
\"
list
\"\n
"
" scr_keyrepeat:str set -scr_keyrepeat to
\"
str
\"\n
"
" scr_keyrepeat:str set -scr_keyrepeat to
\"
str
\"\n
"
" scr_parms:str set -scr_parms parameters.
\n
"
" scr_parms:str set -scr_parms parameters.
\n
"
" fixscreen:str set -fixscreen to
\"
str
\"
.
\n
"
" noxrecord disable all use of RECORD extension.
\n
"
" noxrecord disable all use of RECORD extension.
\n
"
" xrecord enable use of RECORD extension.
\n
"
" xrecord enable use of RECORD extension.
\n
"
" pointer_mode:n set -pointer_mode to n. same as
\"
pm
\"\n
"
" pointer_mode:n set -pointer_mode to n. same as
\"
pm
\"\n
"
...
@@ -29218,20 +29420,21 @@ static void print_help(int mode) {
...
@@ -29218,20 +29420,21 @@ static void print_help(int mode) {
" wireframe wf nowireframe nowf wirecopyrect wcr
\n
"
" wireframe wf nowireframe nowf wirecopyrect wcr
\n
"
" nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys
\n
"
" nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys
\n
"
" scr_term scr_keyrepeat scr_parms scrollcopyrect scr
\n
"
" scr_term scr_keyrepeat scr_parms scrollcopyrect scr
\n
"
" noscrollcopyrect noscr noxrecord xrecord pointer_mode\n"
" noscrollcopyrect noscr fixscreen noxrecord xrecord
\n
"
" pm input_skip input client_input speeds debug_pointer dp\n"
" pointer_mode pm input_skip input client_input speeds
\n
"
" nodebug_pointer nodp debug_keyboard dk nodebug_keyboard\n"
" debug_pointer dp nodebug_pointer nodp debug_keyboard
\n
"
" nodk deferupdate defer wait_ui wait_bog nowait_bog wait\n"
" dk nodebug_keyboard nodk deferupdate defer wait_ui
\n
"
" readtimeout nap nonap sb screen_blank fs gaps grow fuzz\n"
" wait_bog nowait_bog wait readtimeout nap nonap sb
\n
"
" snapfb nosnapfb rawfb progressive rfbport http nohttp\n"
" screen_blank fs gaps grow fuzz snapfb nosnapfb
\n
"
" httpport httpdir enablehttpproxy noenablehttpproxy\n"
" rawfb progressive rfbport http nohttp httpport
\n
"
" alwaysshared noalwaysshared nevershared noalwaysshared\n"
" httpdir enablehttpproxy noenablehttpproxy alwaysshared
\n
"
" dontdisconnect nodontdisconnect desktop debug_xevents\n"
" noalwaysshared nevershared noalwaysshared dontdisconnect
\n
"
" nodebug_xevents debug_xevents debug_xdamage\n"
" nodontdisconnect desktop debug_xevents nodebug_xevents
\n
"
" nodebug_xdamage debug_xdamage debug_wireframe\n"
" debug_xevents debug_xdamage nodebug_xdamage
\n
"
" nodebug_wireframe debug_wireframe debug_scroll\n"
" debug_xdamage debug_wireframe nodebug_wireframe
\n
"
" nodebug_scroll debug_scroll debug_tiles dbt\n"
" debug_wireframe debug_scroll nodebug_scroll debug_scroll
\n
"
" nodebug_tiles nodbt debug_tiles dbg nodbg noremote\n"
" debug_tiles dbt nodebug_tiles nodbt debug_tiles dbg
\n
"
" nodbg noremote
\n
"
"
\n
"
"
\n
"
" aro= display vncdisplay desktopname http_url auth
\n
"
" aro= display vncdisplay desktopname http_url auth
\n
"
" users rootshift clipshift scale_str scaled_x scaled_y
\n
"
" users rootshift clipshift scale_str scaled_x scaled_y
\n
"
...
@@ -30159,6 +30362,9 @@ int main(int argc, char* argv[]) {
...
@@ -30159,6 +30362,9 @@ int main(int argc, char* argv[]) {
}
else
if
(
!
strcmp
(
arg
,
"-scr_parms"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-scr_parms"
))
{
CHECK_ARGC
CHECK_ARGC
scroll_copyrect_str
=
strdup
(
argv
[
++
i
]);
scroll_copyrect_str
=
strdup
(
argv
[
++
i
]);
}
else
if
(
!
strcmp
(
arg
,
"-fixscreen"
))
{
CHECK_ARGC
screen_fixup_str
=
strdup
(
argv
[
++
i
]);
}
else
if
(
!
strcmp
(
arg
,
"-debug_scroll"
)
}
else
if
(
!
strcmp
(
arg
,
"-debug_scroll"
)
||
!
strcmp
(
arg
,
"-ds"
))
{
||
!
strcmp
(
arg
,
"-ds"
))
{
debug_scroll
++
;
debug_scroll
++
;
...
@@ -30569,6 +30775,9 @@ int main(int argc, char* argv[]) {
...
@@ -30569,6 +30775,9 @@ int main(int argc, char* argv[]) {
if
(
!
scroll_copyrect
)
{
if
(
!
scroll_copyrect
)
{
set_scrollcopyrect_mode
(
NULL
);
set_scrollcopyrect_mode
(
NULL
);
}
}
if
(
screen_fixup_str
)
{
parse_fixscreen
();
}
initialize_scroll_matches
();
initialize_scroll_matches
();
initialize_scroll_term
();
initialize_scroll_term
();
initialize_max_keyrepeat
();
initialize_max_keyrepeat
();
...
@@ -30745,8 +30954,15 @@ int main(int argc, char* argv[]) {
...
@@ -30745,8 +30954,15 @@ int main(int argc, char* argv[]) {
scroll_good_str
:
scroll_good_str0
);
scroll_good_str
:
scroll_good_str0
);
fprintf
(
stderr
,
" scr_keys: %s
\n
"
,
scroll_key_list_str
?
fprintf
(
stderr
,
" scr_keys: %s
\n
"
,
scroll_key_list_str
?
scroll_key_list_str
:
"null"
);
scroll_key_list_str
:
"null"
);
fprintf
(
stderr
,
" scr_term: %s
\n
"
,
scroll_term_str
?
scroll_term_str
:
"null"
);
fprintf
(
stderr
,
" scr_keyrep: %s
\n
"
,
max_keyrepeat_str
?
max_keyrepeat_str
:
"null"
);
fprintf
(
stderr
,
" scr_parms: %s
\n
"
,
scroll_copyrect_str
?
fprintf
(
stderr
,
" scr_parms: %s
\n
"
,
scroll_copyrect_str
?
scroll_copyrect_str
:
SCROLL_COPYRECT_PARMS
);
scroll_copyrect_str
:
SCROLL_COPYRECT_PARMS
);
fprintf
(
stderr
,
" fixscreen: %s
\n
"
,
screen_fixup_str
?
screen_fixup_str
:
"null"
);
fprintf
(
stderr
,
" noxrecord: %d
\n
"
,
noxrecord
);
fprintf
(
stderr
,
" ptr_mode: %d
\n
"
,
pointer_mode
);
fprintf
(
stderr
,
" ptr_mode: %d
\n
"
,
pointer_mode
);
fprintf
(
stderr
,
" inputskip: %d
\n
"
,
ui_skip
);
fprintf
(
stderr
,
" inputskip: %d
\n
"
,
ui_skip
);
fprintf
(
stderr
,
" speeds: %s
\n
"
,
speeds_str
fprintf
(
stderr
,
" speeds: %s
\n
"
,
speeds_str
...
...
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