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
5b3e420c
Commit
5b3e420c
authored
Jan 09, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix old compiler error; fix warnings.
parent
c9e24e5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
80 deletions
+88
-80
README
x11vnc/README
+5
-5
userinput.c
x11vnc/userinput.c
+81
-73
x11vnc.1
x11vnc/x11vnc.1
+1
-1
x11vnc_defs.c
x11vnc/x11vnc_defs.c
+1
-1
No files found.
x11vnc/README
View file @
5b3e420c
x11vnc
README
file
Date
:
Mon
Jan
8
23
:
02
:
20
EST
2007
x11vnc
README
file
Date
:
Tue
Jan
9
09
:
38
:
28
EST
2007
The
following
information
is
taken
from
these
URLs
:
The
following
information
is
taken
from
these
URLs
:
...
@@ -667,13 +667,13 @@ make
...
@@ -667,13 +667,13 @@ make
by
default
when
XINERAMA
is
active
.
by
default
when
XINERAMA
is
active
.
*
[
93
]
Viewer
-
side
pixmap
caching
.
This
one
might
not
make
it
into
*
[
93
]
Viewer
-
side
pixmap
caching
.
This
one
might
not
make
it
into
0.8.4
but
will
benefit
from
much
testing
,
thanks
.
A
large
area
of
0.8.4
but
will
benefit
from
much
testing
,
thanks
.
A
large
area
of
pixels
(
at
least
twice
as
big
as
the
framebuffer
itself
;
the
pixels
(
at
least
2
-
3
times
as
big
as
the
framebuffer
itself
;
the
bigger
the
better
...)
is
placed
below
the
framebuffer
to
act
as
a
bigger
the
better
...)
is
placed
below
the
framebuffer
to
act
as
a
buffer
/
cache
area
for
pixel
data
.
The
VNC
CopyRect
encoding
is
buffer
/
cache
area
for
pixel
data
.
The
VNC
CopyRect
encoding
is
used
to
move
it
around
(
so
any
viewer
should
work
).
Until
we
start
used
to
move
it
around
(
so
any
viewer
should
work
).
Until
we
start
modifying
viewers
you
will
be
able
to
see
the
cache
area
if
you
modifying
viewers
you
will
be
able
to
see
the
cache
area
if
you
scroll
down
(
this
makes
it
easier
to
debug
!). Test it with
scroll
down
(
this
makes
it
easier
to
debug
!). Test it with
something
like
"-ncache 1
0
"
.
something
like
"-ncache 1
2
"
.
If
you
have
a
Mac
please
try
out
the
native
Mac
OS
X
support
(
build
If
you
have
a
Mac
please
try
out
the
native
Mac
OS
X
support
(
build
with
"./configure --without-x"
,
or
download
a
binary
mentioned
above
),
with
"./configure --without-x"
,
or
download
a
binary
mentioned
above
),
...
@@ -9349,7 +9349,7 @@ x11vnc: a VNC server for real X displays
...
@@ -9349,7 +9349,7 @@ x11vnc: a VNC server for real X displays
Here
are
all
of
x11vnc
command
line
options
:
Here
are
all
of
x11vnc
command
line
options
:
%
x11vnc
-
opts
(
see
below
for
-
help
long
descriptions
)
%
x11vnc
-
opts
(
see
below
for
-
help
long
descriptions
)
x11vnc
:
allow
VNC
connections
to
real
X11
displays
.
0.8.4
lastmod
:
2007
-
01
-
0
8
x11vnc
:
allow
VNC
connections
to
real
X11
displays
.
0.8.4
lastmod
:
2007
-
01
-
0
9
x11vnc
options
:
x11vnc
options
:
-
display
disp
-
auth
file
-
id
windowid
-
display
disp
-
auth
file
-
id
windowid
...
@@ -9456,7 +9456,7 @@ libvncserver-tight-extension options:
...
@@ -9456,7 +9456,7 @@ libvncserver-tight-extension options:
% x11vnc -help
% x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.8.4 lastmod: 2007-01-0
8
x11vnc: allow VNC connections to real X11 displays. 0.8.4 lastmod: 2007-01-0
9
(type "x11vnc -opts" to just list the options.)
(type "x11vnc -opts" to just list the options.)
...
...
x11vnc/userinput.c
View file @
5b3e420c
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include "xrecord.h"
#include "xrecord.h"
#include "xinerama.h"
#include "xinerama.h"
#include "win_utils.h"
#include "win_utils.h"
#include "xevents.h"
#include "user.h"
#include "user.h"
#include "scan.h"
#include "scan.h"
#include "cleanup.h"
#include "cleanup.h"
...
@@ -61,6 +62,10 @@ void do_copyregion(sraRegionPtr region, int dx, int dy, int mode);
...
@@ -61,6 +62,10 @@ void do_copyregion(sraRegionPtr region, int dx, int dy, int mode);
int
check_ncache
(
int
reset
,
int
mode
);
int
check_ncache
(
int
reset
,
int
mode
);
int
find_rect
(
int
idx
,
int
x
,
int
y
,
int
w
,
int
h
);
int
find_rect
(
int
idx
,
int
x
,
int
y
,
int
w
,
int
h
);
int
bs_restore
(
int
idx
,
int
*
nbatch
,
sraRegionPtr
rmask
,
XWindowAttributes
*
attr
,
int
clip
,
int
nopad
,
int
*
valid
,
int
verb
);
int
try_to_fix_su
(
Window
win
,
int
idx
,
Window
above
,
int
*
nbatch
,
char
*
mode
);
int
try_to_fix_resize_su
(
Window
orig_frame
,
int
orig_x
,
int
orig_y
,
int
orig_w
,
int
orig_h
,
int
x
,
int
y
,
int
w
,
int
h
,
int
try_batch
);
static
void
get_client_regions
(
int
*
req
,
int
*
mod
,
int
*
cpy
,
int
*
num
)
;
static
void
get_client_regions
(
int
*
req
,
int
*
mod
,
int
*
cpy
,
int
*
num
)
;
static
void
parse_scroll_copyrect_str
(
char
*
scr
);
static
void
parse_scroll_copyrect_str
(
char
*
scr
);
...
@@ -1566,7 +1571,7 @@ if (db > 1) fprintf(stderr, "------------ got: %d x: %4d y: %3d"
...
@@ -1566,7 +1571,7 @@ if (db > 1) fprintf(stderr, "------------ got: %d x: %4d y: %3d"
}
}
if
(
fast_push
)
{
if
(
fast_push
)
{
int
k
,
nbatch
=
0
;
int
nbatch
=
0
;
double
delay
,
d1
=
0
.
1
,
d2
=
0
.
02
;
double
delay
,
d1
=
0
.
1
,
d2
=
0
.
02
;
rc
=
try_copyrect
(
frame
,
frame
,
x
,
y
,
w
,
h
,
dx
,
dy
,
&
obscured
,
rc
=
try_copyrect
(
frame
,
frame
,
x
,
y
,
w
,
h
,
dx
,
dy
,
&
obscured
,
tmpregion
,
waittime
,
&
nbatch
);
tmpregion
,
waittime
,
&
nbatch
);
...
@@ -3604,7 +3609,7 @@ void clear_win_events(Window win, int vis) {
...
@@ -3604,7 +3609,7 @@ void clear_win_events(Window win, int vis) {
}
}
}
}
XSetErrorHandler
(
old_handler
);
XSetErrorHandler
(
old_handler
);
fprintf
(
stderr
,
" 0x%
x
\n
"
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
" 0x%
lx
\n
"
,
win
);
}
}
#endif
#endif
}
}
...
@@ -4200,6 +4205,7 @@ if (no) fprintf(stderr, "--NO, wf_raise: %s\n", no);
...
@@ -4200,6 +4205,7 @@ if (no) fprintf(stderr, "--NO, wf_raise: %s\n", no);
snapshot_stack_list
(
0
,
0
.
0
);
snapshot_stack_list
(
0
,
0
.
0
);
snap_old
();
snap_old
();
}
}
return
1
;
}
}
int
set_copyrect_drag
(
int
idx
,
Window
orig_frame
,
int
try_batch
)
{
int
set_copyrect_drag
(
int
idx
,
Window
orig_frame
,
int
try_batch
)
{
...
@@ -5816,7 +5822,7 @@ int lookup_win_index(Window win) {
...
@@ -5816,7 +5822,7 @@ int lookup_win_index(Window win) {
}
}
}
}
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
fprintf
(
stderr
,
"recentC(fail): %d 0x%
x
\n
"
,
idx
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
"recentC(fail): %d 0x%
lx
\n
"
,
idx
,
win
);
s3
++
;
s3
++
;
}
}
if
(
s1
+
s2
+
s3
>=
1000
)
{
if
(
s1
+
s2
+
s3
>=
1000
)
{
...
@@ -5946,7 +5952,7 @@ int lookup_old_stack_index(int ic) {
...
@@ -5946,7 +5952,7 @@ int lookup_old_stack_index(int ic) {
}
}
#define STORE(k, w, attr) \
#define STORE(k, w, attr) \
if (0) fprintf(stderr, "STORE(%d) = 0x%x\n", k, w); \
if (0) fprintf(stderr, "STORE(%d) = 0x%
l
x\n", k, w); \
cache_list[k].win = w; \
cache_list[k].win = w; \
cache_list[k].fetched = 1; \
cache_list[k].fetched = 1; \
cache_list[k].valid = 1; \
cache_list[k].valid = 1; \
...
@@ -5974,7 +5980,7 @@ int lookup_old_stack_index(int ic) {
...
@@ -5974,7 +5980,7 @@ int lookup_old_stack_index(int ic) {
cache_list[k].vis_unobs_time = 0.0;
cache_list[k].vis_unobs_time = 0.0;
#define DELETE(k) \
#define DELETE(k) \
if (0) fprintf(stderr, "DELETE(%d) = 0x%x\n", k, cache_list[k].win); \
if (0) fprintf(stderr, "DELETE(%d) = 0x%
l
x\n", k, cache_list[k].win); \
cache_list[k].win = None; \
cache_list[k].win = None; \
cache_list[k].fetched = 0; \
cache_list[k].fetched = 0; \
cache_list[k].valid = 0; \
cache_list[k].valid = 0; \
...
@@ -6167,8 +6173,8 @@ void expire_rects1(int idx, int w, int h, int *x_hit, int *y_hit, int big1, int
...
@@ -6167,8 +6173,8 @@ void expire_rects1(int idx, int w, int h, int *x_hit, int *y_hit, int big1, int
int
k_w
=
cache_list
[
ik
].
bs_w
;
int
k_w
=
cache_list
[
ik
].
bs_w
;
int
k_h
=
cache_list
[
ik
].
bs_h
;
int
k_h
=
cache_list
[
ik
].
bs_h
;
fprintf
(
stderr
,
">>**--**>> found rect via EXPIRE: %d 0x%x -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d
\n
"
,
fprintf
(
stderr
,
">>**--**>> found rect via EXPIRE: %d 0x%
l
x -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d
\n
"
,
ik
,
(
unsigned
int
)
cache_list
[
ik
].
win
,
w
,
h
,
x
,
y
,
*
x_hit
,
*
y_hit
,
k_w
,
k_h
,
k_x
,
k_y
,
k_w
*
k_h
,
w
*
h
);
ik
,
cache_list
[
ik
].
win
,
w
,
h
,
x
,
y
,
*
x_hit
,
*
y_hit
,
k_w
,
k_h
,
k_x
,
k_y
,
k_w
*
k_h
,
w
*
h
);
free_rect
(
ik
);
free_rect
(
ik
);
fr_EXPIRE
++
;
fr_EXPIRE
++
;
...
@@ -6405,7 +6411,6 @@ fprintf(stderr, "Expire[%02d] %9.5f age=%9.4f area=%8d need=%8d\n", nwgt, 1
...
@@ -6405,7 +6411,6 @@ fprintf(stderr, "Expire[%02d] %9.5f age=%9.4f area=%8d need=%8d\n", nwgt, 1
r1
=
sraRgnCreateRect
(
x0
,
y0
,
x0
+
w
,
y0
+
h
);
r1
=
sraRgnCreateRect
(
x0
,
y0
,
x0
+
w
,
y0
+
h
);
for
(
i
=
0
;
i
<
cache_list_num
;
i
++
)
{
for
(
i
=
0
;
i
<
cache_list_num
;
i
++
)
{
double
top
;
int
xb
=
cache_list
[
i
].
bs_x
;
int
xb
=
cache_list
[
i
].
bs_x
;
int
yb
=
cache_list
[
i
].
bs_y
;
int
yb
=
cache_list
[
i
].
bs_y
;
int
wb
=
cache_list
[
i
].
bs_w
;
int
wb
=
cache_list
[
i
].
bs_w
;
...
@@ -6502,8 +6507,8 @@ fprintf(stderr, "j=%2d acc=%.6f r=%.6f\n", j, norm, r);
...
@@ -6502,8 +6507,8 @@ fprintf(stderr, "j=%2d acc=%.6f r=%.6f\n", j, norm, r);
int
k_w
=
cache_list
[
ik
].
bs_w
;
int
k_w
=
cache_list
[
ik
].
bs_w
;
int
k_h
=
cache_list
[
ik
].
bs_h
;
int
k_h
=
cache_list
[
ik
].
bs_h
;
fprintf
(
stderr
,
">>**--**>> found rect [%d] via RAN EXPIRE: %d 0x%x -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d
\n
"
,
fprintf
(
stderr
,
">>**--**>> found rect [%d] via RAN EXPIRE: %d 0x%
l
x -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d
\n
"
,
get_bs_n
(
*
y_hit
),
ik
,
(
unsigned
int
)
cache_list
[
ik
].
win
,
w
,
h
,
x
,
y
,
*
x_hit
,
*
y_hit
,
k_w
,
k_h
,
k_x
,
k_y
,
k_w
*
k_h
,
w
*
h
);
get_bs_n
(
*
y_hit
),
ik
,
cache_list
[
ik
].
win
,
w
,
h
,
x
,
y
,
*
x_hit
,
*
y_hit
,
k_w
,
k_h
,
k_x
,
k_y
,
k_w
*
k_h
,
w
*
h
);
free_rect
(
ik
);
free_rect
(
ik
);
fr_EXPIRE
++
;
fr_EXPIRE
++
;
...
@@ -6980,14 +6985,14 @@ int bs_save(int idx, int *nbatch, XWindowAttributes *attr, int clip, int only_if
...
@@ -6980,14 +6985,14 @@ int bs_save(int idx, int *nbatch, XWindowAttributes *attr, int clip, int only_if
int
x2
,
y2
,
w2
,
h2
;
int
x2
,
y2
,
w2
,
h2
;
int
x
,
y
,
w
,
h
;
int
x
,
y
,
w
,
h
;
int
dx
,
dy
,
rc
=
1
;
int
dx
,
dy
,
rc
=
1
;
sraRegionPtr
r
,
r0
,
r1
;
sraRegionPtr
r
,
r0
;
x1
=
cache_list
[
idx
].
x
;
x1
=
cache_list
[
idx
].
x
;
y1
=
cache_list
[
idx
].
y
;
y1
=
cache_list
[
idx
].
y
;
w1
=
cache_list
[
idx
].
width
;
w1
=
cache_list
[
idx
].
width
;
h1
=
cache_list
[
idx
].
height
;
h1
=
cache_list
[
idx
].
height
;
if
(
verb
)
fprintf
(
stderr
,
"backingstore save: 0x%
x %3d clip=%d
\n
"
,
(
unsigned
int
)
win
,
idx
,
clip
);
if
(
verb
)
fprintf
(
stderr
,
"backingstore save: 0x%
lx %3d clip=%d
\n
"
,
win
,
idx
,
clip
);
X_LOCK
;
X_LOCK
;
if
(
*
valid
)
{
if
(
*
valid
)
{
...
@@ -6996,7 +7001,7 @@ if (verb) fprintf(stderr, "backingstore save: 0x%x %3d clip=%d\n", (unsig
...
@@ -6996,7 +7001,7 @@ if (verb) fprintf(stderr, "backingstore save: 0x%x %3d clip=%d\n", (unsig
attr
->
width
=
w1
;
attr
->
width
=
w1
;
attr
->
height
=
h1
;
attr
->
height
=
h1
;
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
fprintf
(
stderr
,
"bs_save: not a valid X window: 0x%
x
\n
"
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
"bs_save: not a valid X window: 0x%
lx
\n
"
,
win
);
X_UNLOCK
;
X_UNLOCK
;
*
valid
=
0
;
*
valid
=
0
;
cache_list
[
idx
].
valid
=
0
;
cache_list
[
idx
].
valid
=
0
;
...
@@ -7081,7 +7086,7 @@ int su_save(int idx, int *nbatch, XWindowAttributes *attr, int clip, int *valid,
...
@@ -7081,7 +7086,7 @@ int su_save(int idx, int *nbatch, XWindowAttributes *attr, int clip, int *valid,
int
dx
,
dy
,
rc
=
1
;
int
dx
,
dy
,
rc
=
1
;
sraRegionPtr
r
,
r0
;
sraRegionPtr
r
,
r0
;
if
(
verb
)
fprintf
(
stderr
,
"save-unders save: 0x%
x %3d
\n
"
,
(
unsigned
int
)
win
,
idx
);
if
(
verb
)
fprintf
(
stderr
,
"save-unders save: 0x%
lx %3d
\n
"
,
win
,
idx
);
x1
=
cache_list
[
idx
].
x
;
x1
=
cache_list
[
idx
].
x
;
y1
=
cache_list
[
idx
].
y
;
y1
=
cache_list
[
idx
].
y
;
...
@@ -7095,7 +7100,7 @@ if (verb) fprintf(stderr, "save-unders save: 0x%x %3d \n", (unsigned int
...
@@ -7095,7 +7100,7 @@ if (verb) fprintf(stderr, "save-unders save: 0x%x %3d \n", (unsigned int
attr
->
width
=
w1
;
attr
->
width
=
w1
;
attr
->
height
=
h1
;
attr
->
height
=
h1
;
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
fprintf
(
stderr
,
"su_save: not a valid X window: 0x%
x
\n
"
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
"su_save: not a valid X window: 0x%
lx
\n
"
,
win
);
X_UNLOCK
;
X_UNLOCK
;
*
valid
=
0
;
*
valid
=
0
;
cache_list
[
idx
].
valid
=
0
;
cache_list
[
idx
].
valid
=
0
;
...
@@ -7175,7 +7180,7 @@ int bs_restore(int idx, int *nbatch, sraRegionPtr rmask, XWindowAttributes *attr
...
@@ -7175,7 +7180,7 @@ int bs_restore(int idx, int *nbatch, sraRegionPtr rmask, XWindowAttributes *attr
int
dx
,
dy
;
int
dx
,
dy
;
sraRegionPtr
r
,
r0
;
sraRegionPtr
r
,
r0
;
if
(
verb
)
fprintf
(
stderr
,
"backingstore restore: 0x%
x %3d
\n
"
,
(
unsigned
int
)
win
,
idx
);
if
(
verb
)
fprintf
(
stderr
,
"backingstore restore: 0x%
lx %3d
\n
"
,
win
,
idx
);
x1
=
cache_list
[
idx
].
x
;
x1
=
cache_list
[
idx
].
x
;
y1
=
cache_list
[
idx
].
y
;
y1
=
cache_list
[
idx
].
y
;
...
@@ -7189,7 +7194,7 @@ if (verb) fprintf(stderr, "backingstore restore: 0x%x %3d \n", (unsigned int
...
@@ -7189,7 +7194,7 @@ if (verb) fprintf(stderr, "backingstore restore: 0x%x %3d \n", (unsigned int
attr
->
width
=
w1
;
attr
->
width
=
w1
;
attr
->
height
=
h1
;
attr
->
height
=
h1
;
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
fprintf
(
stderr
,
"BS_restore: not a valid X window: 0x%
x
\n
"
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
"BS_restore: not a valid X window: 0x%
lx
\n
"
,
win
);
*
valid
=
0
;
*
valid
=
0
;
X_UNLOCK
;
X_UNLOCK
;
return
0
;
return
0
;
...
@@ -7273,12 +7278,12 @@ if (verb) fprintf(stderr, "BS_rest: %.4f %.2f %d done. %dx%d+%d+%d %dx%d+%d+%d
...
@@ -7273,12 +7278,12 @@ if (verb) fprintf(stderr, "BS_rest: %.4f %.2f %d done. %dx%d+%d+%d %dx%d+%d+%d
int
su_restore
(
int
idx
,
int
*
nbatch
,
sraRegionPtr
rmask
,
XWindowAttributes
*
attr
,
int
clip
,
int
nopad
,
int
*
valid
,
int
verb
)
{
int
su_restore
(
int
idx
,
int
*
nbatch
,
sraRegionPtr
rmask
,
XWindowAttributes
*
attr
,
int
clip
,
int
nopad
,
int
*
valid
,
int
verb
)
{
Window
win
=
cache_list
[
idx
].
win
;
Window
win
=
cache_list
[
idx
].
win
;
int
x1
,
y1
,
w1
,
h1
;
int
x1
,
y1
,
w1
,
h1
;
int
x2
,
y2
,
w2
,
h2
;
int
x2
=
0
,
y2
=
0
,
w2
=
0
,
h2
=
0
;
int
x
,
y
,
w
,
h
;
int
x
,
y
,
w
,
h
;
int
dx
,
dy
;
int
dx
,
dy
;
sraRegionPtr
r
,
r0
;
sraRegionPtr
r
,
r0
;
if
(
verb
)
fprintf
(
stderr
,
"save-unders restore: 0x%
x %3d
\n
"
,
(
unsigned
int
)
win
,
idx
);
if
(
verb
)
fprintf
(
stderr
,
"save-unders restore: 0x%
lx %3d
\n
"
,
win
,
idx
);
x1
=
cache_list
[
idx
].
x
;
x1
=
cache_list
[
idx
].
x
;
y1
=
cache_list
[
idx
].
y
;
y1
=
cache_list
[
idx
].
y
;
...
@@ -7291,8 +7296,12 @@ if (verb) fprintf(stderr, "save-unders restore: 0x%x %3d \n", (unsigned int
...
@@ -7291,8 +7296,12 @@ if (verb) fprintf(stderr, "save-unders restore: 0x%x %3d \n", (unsigned int
attr
->
y
=
y1
;
attr
->
y
=
y1
;
attr
->
width
=
w1
;
attr
->
width
=
w1
;
attr
->
height
=
h1
;
attr
->
height
=
h1
;
x2
=
attr
->
x
;
y2
=
attr
->
y
;
w2
=
attr
->
width
;
h2
=
attr
->
height
;
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
}
else
if
(
!
valid_wr
(
idx
,
win
,
attr
))
{
fprintf
(
stderr
,
"SU_restore: not a valid X window: 0x%
x
\n
"
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
"SU_restore: not a valid X window: 0x%
lx
\n
"
,
win
);
*
valid
=
0
;
*
valid
=
0
;
x2
=
x1
;
x2
=
x1
;
y2
=
y1
;
y2
=
y1
;
...
@@ -7451,7 +7460,7 @@ void block_stats(void) {
...
@@ -7451,7 +7460,7 @@ void block_stats(void) {
if
(
!
rc
&&
!
macosx_console
)
{
if
(
!
rc
&&
!
macosx_console
)
{
char
*
u
=
getenv
(
"USER"
);
char
*
u
=
getenv
(
"USER"
);
if
(
u
&&
!
strcmp
(
u
,
"runge"
))
fprintf
(
stderr
,
"
\a
"
);
if
(
u
&&
!
strcmp
(
u
,
"runge"
))
fprintf
(
stderr
,
"
\a
"
);
fprintf
(
stderr
,
"
\n
*** UNRECLAIMED WINDOW: 0x%
x %dx%d+%d+%d
\n\n
"
,
(
unsigned
int
)
win
,
w
,
h
,
x
,
y
);
fprintf
(
stderr
,
"
\n
*** UNRECLAIMED WINDOW: 0x%
lx %dx%d+%d+%d
\n\n
"
,
win
,
w
,
h
,
x
,
y
);
DELETE
(
k
);
DELETE
(
k
);
}
}
if
(
t
<
3
||
(
t
%
4
)
==
0
||
hack_val
||
macosx_console
)
{
if
(
t
<
3
||
(
t
%
4
)
==
0
||
hack_val
||
macosx_console
)
{
...
@@ -7459,8 +7468,8 @@ void block_stats(void) {
...
@@ -7459,8 +7468,8 @@ void block_stats(void) {
double
t2
=
cache_list
[
k
].
bs_time
;
double
t2
=
cache_list
[
k
].
bs_time
;
if
(
t1
>
0
.
0
)
{
t1
=
dnow
()
-
t1
;}
else
{
t1
=
-
1
.
0
;}
if
(
t1
>
0
.
0
)
{
t1
=
dnow
()
-
t1
;}
else
{
t1
=
-
1
.
0
;}
if
(
t2
>
0
.
0
)
{
t2
=
dnow
()
-
t2
;}
else
{
t2
=
-
1
.
0
;}
if
(
t2
>
0
.
0
)
{
t2
=
dnow
()
-
t2
;}
else
{
t2
=
-
1
.
0
;}
fprintf
(
stderr
,
" [%02d] %04d 0x%08x bs: %04dx%04d+%04d+%05d vw: %04dx%04d+%04d+%04d cl: %04dx%04d+%04d+%04d map=%d su=%9.3f bs=%9.3f cnt=%d/%d
\n
"
,
fprintf
(
stderr
,
" [%02d] %04d 0x%08
l
x bs: %04dx%04d+%04d+%05d vw: %04dx%04d+%04d+%04d cl: %04dx%04d+%04d+%04d map=%d su=%9.3f bs=%9.3f cnt=%d/%d
\n
"
,
n
,
k
,
(
unsigned
int
)
win
,
w
,
h
,
x
,
y
,
attr
.
width
,
attr
.
height
,
attr
.
x
,
attr
.
y
,
n
,
k
,
win
,
w
,
h
,
x
,
y
,
attr
.
width
,
attr
.
height
,
attr
.
x
,
attr
.
y
,
cache_list
[
k
].
width
,
cache_list
[
k
].
height
,
cache_list
[
k
].
x
,
cache_list
[
k
].
y
,
cache_list
[
k
].
width
,
cache_list
[
k
].
height
,
cache_list
[
k
].
x
,
cache_list
[
k
].
y
,
attr
.
map_state
==
IsViewable
,
t1
,
t2
,
cache_list
[
k
].
create_cnt
,
cache_list
[
k
].
map_cnt
);
attr
.
map_state
==
IsViewable
,
t1
,
t2
,
cache_list
[
k
].
create_cnt
,
cache_list
[
k
].
map_cnt
);
}
}
...
@@ -7553,7 +7562,7 @@ void xselectinput(Window w, unsigned long evmask, int sync) {
...
@@ -7553,7 +7562,7 @@ void xselectinput(Window w, unsigned long evmask, int sync) {
if
(
trapped_xioerror
)
{
if
(
trapped_xioerror
)
{
fprintf
(
stderr
,
"XSELECTINPUT: trapped XIO Error."
);
fprintf
(
stderr
,
"XSELECTINPUT: trapped XIO Error."
);
}
}
if
(
sync
)
fprintf
(
stderr
,
"XSELECTINPUT: 0x%
x sync=%d err=%d/%d
\n
"
,
(
unsigned
int
)
w
,
sync
,
trapped_xerror
,
trapped_xioerror
);
if
(
sync
)
fprintf
(
stderr
,
"XSELECTINPUT: 0x%
lx sync=%d err=%d/%d
\n
"
,
w
,
sync
,
trapped_xerror
,
trapped_xioerror
);
}
}
Bool
xcheckmaskevent
(
Display
*
d
,
long
mask
,
XEvent
*
ev
)
{
Bool
xcheckmaskevent
(
Display
*
d
,
long
mask
,
XEvent
*
ev
)
{
...
@@ -7606,9 +7615,7 @@ int try_to_fix_resize_su(Window orig_frame, int orig_x, int orig_y, int orig_w,
...
@@ -7606,9 +7615,7 @@ int try_to_fix_resize_su(Window orig_frame, int orig_x, int orig_y, int orig_w,
int
idx
=
lookup_win_index
(
orig_frame
);
int
idx
=
lookup_win_index
(
orig_frame
);
sraRegionPtr
r0
,
r1
,
r2
,
r3
;
sraRegionPtr
r0
,
r1
,
r2
,
r3
;
int
sx1
,
sy1
,
sw1
,
sh1
,
dx
,
dy
;
int
sx1
,
sy1
,
sw1
,
sh1
,
dx
,
dy
;
int
sx2
,
sy2
,
sw2
,
sh2
;
int
bx1
,
by1
,
bw1
,
bh1
;
int
bx1
,
by1
,
bw1
,
bh1
;
int
bx2
,
by2
,
bw2
,
bh2
;
int
nr
=
0
,
*
nbat
=
NULL
;
int
nr
=
0
,
*
nbat
=
NULL
;
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
...
@@ -7729,11 +7736,13 @@ fprintf(stderr, "Growing resize %d %dx%d+%d+%d -> %dx%d+%d+%d\n", idx, orig_w,
...
@@ -7729,11 +7736,13 @@ fprintf(stderr, "Growing resize %d %dx%d+%d+%d -> %dx%d+%d+%d\n", idx, orig_w,
sraRgnDestroy
(
r0
);
sraRgnDestroy
(
r0
);
sraRgnDestroy
(
r1
);
sraRgnDestroy
(
r1
);
sraRgnDestroy
(
r2
);
sraRgnDestroy
(
r2
);
return
1
;
}
}
int
try_to_fix_su
(
Window
win
,
int
idx
,
Window
above
,
int
*
nbatch
,
char
*
mode
)
{
int
try_to_fix_su
(
Window
win
,
int
idx
,
Window
above
,
int
*
nbatch
,
char
*
mode
)
{
int
i
,
idx2
,
n
=
0
,
found
=
0
,
found_above
=
0
;
int
i
,
idx2
,
n
=
0
,
found
=
0
,
found_above
=
0
;
sraRegionPtr
r0
,
r1
,
r2
,
r3
;
sraRegionPtr
r0
,
r1
,
r2
;
Window
win2
;
Window
win2
;
int
x
,
y
,
w
,
h
,
on
=
0
;
int
x
,
y
,
w
,
h
,
on
=
0
;
int
x0
,
y0
,
w0
,
h0
;
int
x0
,
y0
,
w0
,
h0
;
...
@@ -7751,7 +7760,7 @@ int try_to_fix_su(Window win, int idx, Window above, int *nbatch, char *mode) {
...
@@ -7751,7 +7760,7 @@ int try_to_fix_su(Window win, int idx, Window above, int *nbatch, char *mode) {
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
return
0
;
return
0
;
}
}
fprintf
(
stderr
,
"TRY_TO_FIX_SU(%d) 0x%
x 0x%
x was_unmapped=%d map_state=%s
\n
"
,
idx
,
win
,
above
,
unmapped
,
MState
(
cache_list
[
idx
].
map_state
));
fprintf
(
stderr
,
"TRY_TO_FIX_SU(%d) 0x%
lx 0x%l
x was_unmapped=%d map_state=%s
\n
"
,
idx
,
win
,
above
,
unmapped
,
MState
(
cache_list
[
idx
].
map_state
));
if
(
cache_list
[
idx
].
map_state
!=
IsViewable
&&
!
unmapped
)
{
if
(
cache_list
[
idx
].
map_state
!=
IsViewable
&&
!
unmapped
)
{
return
0
;
return
0
;
...
@@ -7788,12 +7797,12 @@ fprintf(stderr, "TRY_TO_FIX_SU(%d) 0x%x 0x%x was_unmapped=%d map_state=%s\n",
...
@@ -7788,12 +7797,12 @@ fprintf(stderr, "TRY_TO_FIX_SU(%d) 0x%x 0x%x was_unmapped=%d map_state=%s\n",
for
(
i
=
old_stack_n
-
1
;
i
>=
0
;
i
--
)
{
for
(
i
=
old_stack_n
-
1
;
i
>=
0
;
i
--
)
{
win2
=
old_stack
[
i
];
win2
=
old_stack
[
i
];
if
(
win2
==
above
)
{
if
(
win2
==
above
)
{
fprintf
(
stderr
,
"0x%
x turn on: 0x%
x i=%d
\n
"
,
win
,
win2
,
i
);
fprintf
(
stderr
,
"0x%
lx turn on: 0x%l
x i=%d
\n
"
,
win
,
win2
,
i
);
on
=
1
;
on
=
1
;
found_above
=
1
;
found_above
=
1
;
}
}
if
(
win2
==
win
)
{
if
(
win2
==
win
)
{
fprintf
(
stderr
,
"0x%
x turn off: 0x%
x i=%d
\n
"
,
win
,
win2
,
i
);
fprintf
(
stderr
,
"0x%
lx turn off: 0x%l
x i=%d
\n
"
,
win
,
win2
,
i
);
found
=
1
;
found
=
1
;
on
=
0
;
on
=
0
;
break
;
break
;
...
@@ -7959,7 +7968,7 @@ sraRegionPtr idx_create_rgn(sraRegionPtr r0, int idx) {
...
@@ -7959,7 +7968,7 @@ sraRegionPtr idx_create_rgn(sraRegionPtr r0, int idx) {
void
set_ncache_xrootpmap
(
void
)
{
void
set_ncache_xrootpmap
(
void
)
{
Atom
pmap
,
type
;
Atom
pmap
,
type
;
int
done
=
0
,
format
;
int
format
;
unsigned
long
length
,
after
;
unsigned
long
length
,
after
;
XImage
*
image
=
NULL
;
XImage
*
image
=
NULL
;
...
@@ -7972,7 +7981,6 @@ void set_ncache_xrootpmap(void) {
...
@@ -7972,7 +7981,6 @@ void set_ncache_xrootpmap(void) {
pmap
=
XInternAtom
(
dpy
,
"_XROOTPMAP_ID"
,
True
);
pmap
=
XInternAtom
(
dpy
,
"_XROOTPMAP_ID"
,
True
);
if
(
pmap
!=
None
)
{
if
(
pmap
!=
None
)
{
Pixmap
pixmap
;
Pixmap
pixmap
;
char
*
data
;
unsigned
char
*
d_pmap
;
unsigned
char
*
d_pmap
;
XGetWindowProperty
(
dpy
,
rootwin
,
pmap
,
0L
,
1L
,
False
,
XGetWindowProperty
(
dpy
,
rootwin
,
pmap
,
0L
,
1L
,
False
,
...
@@ -7990,7 +7998,7 @@ void set_ncache_xrootpmap(void) {
...
@@ -7990,7 +7998,7 @@ void set_ncache_xrootpmap(void) {
}
}
if
(
image
!=
NULL
)
{
if
(
image
!=
NULL
)
{
char
*
src
,
*
dst
;
char
*
src
,
*
dst
;
unsigned
int
line
;
int
line
;
int
pixelsize
=
bpp
/
8
;
int
pixelsize
=
bpp
/
8
;
int
y1
=
dpy_y
*
(
ncache
+
1
);
int
y1
=
dpy_y
*
(
ncache
+
1
);
...
@@ -8044,6 +8052,7 @@ int ev_store(Window win, int type) {
...
@@ -8044,6 +8052,7 @@ int ev_store(Window win, int type) {
}
}
_ev_list
[
_ev_list_cnt
]
=
win
;
_ev_list
[
_ev_list_cnt
]
=
win
;
_ev_case
[
_ev_list_cnt
++
]
=
type
;
_ev_case
[
_ev_list_cnt
++
]
=
type
;
return
1
;
}
}
int
ev_lookup
(
Window
win
,
int
type
)
{
int
ev_lookup
(
Window
win
,
int
type
)
{
...
@@ -8065,8 +8074,12 @@ void read_events(int *n_in) {
...
@@ -8065,8 +8074,12 @@ void read_events(int *n_in) {
XEvent
ev
;
XEvent
ev
;
while
(
xcheckmaskevent
(
dpy
,
all_ev
,
&
Ev
[
n
]))
{
while
(
xcheckmaskevent
(
dpy
,
all_ev
,
&
Ev
[
n
]))
{
int
cfg_size
=
0
;
int
cfg_pos
=
0
;
int
cfg_stack
=
0
;
int
type
=
Ev
[
n
].
type
;
int
type
=
Ev
[
n
].
type
;
Window
w
=
None
;
Window
w
=
None
;
win
=
Ev
[
n
].
xany
.
window
;
win
=
Ev
[
n
].
xany
.
window
;
Ev_done
[
n
]
=
0
;
Ev_done
[
n
]
=
0
;
Ev_area
[
n
]
=
0
;
Ev_area
[
n
]
=
0
;
...
@@ -8074,9 +8087,6 @@ void read_events(int *n_in) {
...
@@ -8074,9 +8087,6 @@ void read_events(int *n_in) {
Ev_map
[
n
]
=
None
;
Ev_map
[
n
]
=
None
;
Ev_unmap
[
n
]
=
None
;
Ev_unmap
[
n
]
=
None
;
Ev_order
[
n
]
=
n
;
Ev_order
[
n
]
=
n
;
int
cfg_size
=
0
;
int
cfg_pos
=
0
;
int
cfg_stack
=
0
;
ev
=
Ev
[
n
];
ev
=
Ev
[
n
];
...
@@ -8125,7 +8135,7 @@ void read_events(int *n_in) {
...
@@ -8125,7 +8135,7 @@ void read_events(int *n_in) {
}
}
}
}
fprintf
(
stderr
,
"----- %02d inputev 0x%08
x w: 0x%08
x %04dx%04d+%04d+%04d %s %s
\n
"
,
n
,
win
,
w
,
wd
,
ht
,
x
,
y
,
Etype
(
type
),
msg
);
fprintf
(
stderr
,
"----- %02d inputev 0x%08
lx w: 0x%08l
x %04dx%04d+%04d+%04d %s %s
\n
"
,
n
,
win
,
w
,
wd
,
ht
,
x
,
y
,
Etype
(
type
),
msg
);
}
}
if
(
win
==
rootwin
)
{
if
(
win
==
rootwin
)
{
...
@@ -8161,7 +8171,7 @@ if (type == UnmapNotify) w = Ev[n].xunmap.window;
...
@@ -8161,7 +8171,7 @@ if (type == UnmapNotify) w = Ev[n].xunmap.window;
if (type == MapNotify) w = Ev[n].xmap.window;
if (type == MapNotify) w = Ev[n].xmap.window;
if (type == Expose) w = Ev[n].xexpose.window;
if (type == Expose) w = Ev[n].xexpose.window;
if (type == ConfigureNotify) w = Ev[n].xconfigure.window;
if (type == ConfigureNotify) w = Ev[n].xconfigure.window;
if (type != ConfigureNotify) fprintf(stderr, "root: skip %s for 0x%
x\n", Etype(type), (unsigned int)
w);
if (type != ConfigureNotify) fprintf(stderr, "root: skip %s for 0x%
lx\n", Etype(type),
w);
#endif
#endif
}
}
...
@@ -8220,10 +8230,9 @@ fprintf(stderr, "----- skip %s\n", Etype(type));
...
@@ -8220,10 +8230,9 @@ fprintf(stderr, "----- skip %s\n", Etype(type));
}
}
int
try_to_synthesize_su
(
int
force
,
int
*
nbatch
)
{
int
try_to_synthesize_su
(
int
force
,
int
*
nbatch
)
{
int
i
,
j
,
idx
,
idx2
,
n
=
0
;
int
i
,
idx
,
idx2
,
n
=
0
;
sraRegionPtr
r0
,
r1
,
r2
,
r3
;
sraRegionPtr
r0
,
r1
,
r2
;
Window
win
,
win2
;
Window
win
=
None
;
int
x
,
y
,
w
,
h
,
on
=
0
;
int
x0
,
y0
,
w0
,
h0
;
int
x0
,
y0
,
w0
,
h0
;
int
x1
,
y1
,
w1
,
h1
;
int
x1
,
y1
,
w1
,
h1
;
int
x2
,
y2
,
w2
,
h2
;
int
x2
,
y2
,
w2
,
h2
;
...
@@ -8247,7 +8256,7 @@ int try_to_synthesize_su(int force, int *nbatch) {
...
@@ -8247,7 +8256,7 @@ int try_to_synthesize_su(int force, int *nbatch) {
if
(
attr
.
map_state
!=
IsViewable
)
{
if
(
attr
.
map_state
!=
IsViewable
)
{
continue
;
continue
;
}
}
//fprintf(stderr, "win: 0x%x %d idx=%d\n", win, i, idx);
//fprintf(stderr, "win: 0x%
l
x %d idx=%d\n", win, i, idx);
x2
=
attr
.
x
;
x2
=
attr
.
x
;
y2
=
attr
.
y
;
y2
=
attr
.
y
;
...
@@ -8269,7 +8278,7 @@ int try_to_synthesize_su(int force, int *nbatch) {
...
@@ -8269,7 +8278,7 @@ int try_to_synthesize_su(int force, int *nbatch) {
}
}
for
(
i
=
0
;
i
<
n
;
i
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
{
int
i2
,
ok
=
1
,
cnt
=
0
;
int
i2
,
cnt
=
0
;
idx
=
tmp_stack
[
i
];
idx
=
tmp_stack
[
i
];
if
(
idx
<
0
||
cache_list
[
idx
].
bs_x
<
0
)
{
if
(
idx
<
0
||
cache_list
[
idx
].
bs_x
<
0
)
{
continue
;
continue
;
...
@@ -8280,14 +8289,13 @@ int try_to_synthesize_su(int force, int *nbatch) {
...
@@ -8280,14 +8289,13 @@ int try_to_synthesize_su(int force, int *nbatch) {
}
}
if
(
cache_list
[
idx
].
su_time
>
0
.
0
)
{
if
(
cache_list
[
idx
].
su_time
>
0
.
0
)
{
if
(
force
)
{
if
(
force
)
{
fprintf
(
stderr
,
"forcing synth: 0x%x %d
\n
"
,
cache_list
[
idx
].
win
,
idx
);
fprintf
(
stderr
,
"forcing synth: 0x%
l
x %d
\n
"
,
cache_list
[
idx
].
win
,
idx
);
}
else
{
}
else
{
continue
;
continue
;
}
}
}
}
if
(
ncache_xrootpmap
)
{
if
(
ncache_xrootpmap
)
{
int
dx
,
dy
;
int
dx
,
dy
;
int
dx2
,
dy2
;
x0
=
cache_list
[
idx
].
x
;
x0
=
cache_list
[
idx
].
x
;
y0
=
cache_list
[
idx
].
y
;
y0
=
cache_list
[
idx
].
y
;
...
@@ -8364,7 +8372,7 @@ fprintf(stderr, "forcing synth: 0x%x %d\n", cache_list[idx].win, idx);
...
@@ -8364,7 +8372,7 @@ fprintf(stderr, "forcing synth: 0x%x %d\n", cache_list[idx].win, idx);
if
(
cnt
)
{
if
(
cnt
)
{
cache_list
[
idx
].
su_time
=
dnow
();
cache_list
[
idx
].
su_time
=
dnow
();
}
}
fprintf
(
stderr
,
" try_to_synth_su: 0x%x %d idx=%d cnt=%d
\n
"
,
win
,
i
,
idx
,
cnt
);
fprintf
(
stderr
,
" try_to_synth_su: 0x%
l
x %d idx=%d cnt=%d
\n
"
,
win
,
i
,
idx
,
cnt
);
}
}
r1
=
NULL
;
r1
=
NULL
;
...
@@ -8412,7 +8420,7 @@ fprintf(stderr, "DELETE(%d) %dx%d+%d+%d\n", k, cache_list[k].width, cache_list[k
...
@@ -8412,7 +8420,7 @@ fprintf(stderr, "DELETE(%d) %dx%d+%d+%d\n", k, cache_list[k].width, cache_list[k
if
(
valid
)
{
if
(
valid
)
{
if
(
cache_list
[
k
].
create_cnt
&&
cache_list
[
k
].
map_state
!=
IsViewable
&&
cache_list
[
k
].
map_cnt
==
0
)
{
if
(
cache_list
[
k
].
create_cnt
&&
cache_list
[
k
].
map_state
!=
IsViewable
&&
cache_list
[
k
].
map_cnt
==
0
)
{
if
(
cache_list
[
k
].
bs_x
>=
0
)
{
if
(
cache_list
[
k
].
bs_x
>=
0
)
{
fprintf
(
stderr
,
"Created window never mapped: freeing(%d) 0x%
x
\n
"
,
k
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
"Created window never mapped: freeing(%d) 0x%
lx
\n
"
,
k
,
win
);
free_rect
(
k
);
free_rect
(
k
);
}
}
}
}
...
@@ -8472,7 +8480,7 @@ fprintf(stderr, "Created window never mapped: freeing(%d) 0x%x\n", k, (unsigned
...
@@ -8472,7 +8480,7 @@ fprintf(stderr, "Created window never mapped: freeing(%d) 0x%x\n", k, (unsigned
}
else
if
(
aw
*
ah
<
64
*
64
)
{
}
else
if
(
aw
*
ah
<
64
*
64
)
{
;
;
}
else
{
}
else
{
fprintf
(
stderr
,
"*SNAP BS_save: 0x%
x %d %d %d
\n
"
,
(
unsigned
int
)
win
,
aw
,
ah
,
cache_list
[
idx
].
map_state
);
fprintf
(
stderr
,
"*SNAP BS_save: 0x%
lx %d %d %d
\n
"
,
win
,
aw
,
ah
,
cache_list
[
idx
].
map_state
);
valid
=
0
;
valid
=
0
;
bs_save
(
idx
,
bat
,
&
attr
,
1
,
0
,
&
valid
,
0
);
bs_save
(
idx
,
bat
,
&
attr
,
1
,
0
,
&
valid
,
0
);
if
(
valid
)
{
if
(
valid
)
{
...
@@ -8482,7 +8490,7 @@ fprintf(stderr, "*SNAP BS_save: 0x%x %d %d %d\n", (unsigned int) win, aw, ah, ca
...
@@ -8482,7 +8490,7 @@ fprintf(stderr, "*SNAP BS_save: 0x%x %d %d %d\n", (unsigned int) win, aw, ah, ca
}
}
}
}
}
else
{
}
else
{
fprintf
(
stderr
,
"*SCHED LOOKUP FAIL: i=%d 0x%x
\n
"
,
i
,
win
);
fprintf
(
stderr
,
"*SCHED LOOKUP FAIL: i=%d 0x%
l
x
\n
"
,
i
,
win
);
}
}
}
}
sched_bs
[
i
]
=
None
;
sched_bs
[
i
]
=
None
;
...
@@ -8569,7 +8577,7 @@ if (vis_now_n) fprintf(stderr, "*VIS snapshot all %.4f\n", dnowx());
...
@@ -8569,7 +8577,7 @@ if (vis_now_n) fprintf(stderr, "*VIS snapshot all %.4f\n", dnowx());
i
=
vis_now
[
k
];
i
=
vis_now
[
k
];
win
=
cache_list
[
i
].
win
;
win
=
cache_list
[
i
].
win
;
valid
=
0
;
valid
=
0
;
fprintf
(
stderr
,
"*VIS BS_save: 0x%x %d %d %d
\n
"
,
win
,
cache_list
[
i
].
width
,
cache_list
[
i
].
height
,
cache_list
[
i
].
map_state
);
fprintf
(
stderr
,
"*VIS BS_save: 0x%
l
x %d %d %d
\n
"
,
win
,
cache_list
[
i
].
width
,
cache_list
[
i
].
height
,
cache_list
[
i
].
map_state
);
if
(
now
<
cache_list
[
i
].
vis_unobs_time
+
0
.
75
&&
now
<
cache_list
[
i
].
vis_obs_time
+
0
.
75
)
{
if
(
now
<
cache_list
[
i
].
vis_unobs_time
+
0
.
75
&&
now
<
cache_list
[
i
].
vis_obs_time
+
0
.
75
)
{
continue
;
continue
;
}
}
...
@@ -8821,7 +8829,7 @@ if (hack_val == 2) {
...
@@ -8821,7 +8829,7 @@ if (hack_val == 2) {
win2
=
ev
.
xcreatewindow
.
window
;
win2
=
ev
.
xcreatewindow
.
window
;
if
(
ev_lookup
(
win2
,
EV_REPARENT
)
||
ev_lookup
(
win2
,
EV_DESTROY
))
{
if
(
ev_lookup
(
win2
,
EV_REPARENT
)
||
ev_lookup
(
win2
,
EV_DESTROY
))
{
if
(
skipwins_n
<
skipwins_max
)
{
if
(
skipwins_n
<
skipwins_max
)
{
fprintf
(
stderr
,
"SKIPWINS: CreateNotify: 0x%x %d
\n
"
,
win2
,
n1
);
fprintf
(
stderr
,
"SKIPWINS: CreateNotify: 0x%
l
x %d
\n
"
,
win2
,
n1
);
skipwins
[
skipwins_n
++
]
=
win2
;
skipwins
[
skipwins_n
++
]
=
win2
;
}
}
}
else
{
}
else
{
...
@@ -8833,13 +8841,13 @@ fprintf(stderr, "SKIPWINS: CreateNotify: 0x%x %d\n", win2, n1);
...
@@ -8833,13 +8841,13 @@ fprintf(stderr, "SKIPWINS: CreateNotify: 0x%x %d\n", win2, n1);
}
}
CLEAR
(
idx
);
CLEAR
(
idx
);
}
}
fprintf
(
stderr
,
"PRELOOP: CreateNotify: 0x%x %d valid_window
\n
"
,
win2
,
n1
);
fprintf
(
stderr
,
"PRELOOP: CreateNotify: 0x%
l
x %d valid_window
\n
"
,
win2
,
n1
);
if
(
valid_window
(
win2
,
&
attr
,
1
))
{
if
(
valid_window
(
win2
,
&
attr
,
1
))
{
STORE
(
idx
,
win2
,
attr
);
STORE
(
idx
,
win2
,
attr
);
CLEAR
(
idx
);
CLEAR
(
idx
);
cache_list
[
idx
].
selectinput
=
1
;
cache_list
[
idx
].
selectinput
=
1
;
cache_list
[
idx
].
create_cnt
=
1
;
cache_list
[
idx
].
create_cnt
=
1
;
fprintf
(
stderr
,
"PRELOOP: CreateNotify: 0x%x %d xselectinput
\n
"
,
win2
,
n1
);
fprintf
(
stderr
,
"PRELOOP: CreateNotify: 0x%
l
x %d xselectinput
\n
"
,
win2
,
n1
);
xselectinput
(
win2
,
win_ev
,
1
);
xselectinput
(
win2
,
win_ev
,
1
);
nxsel
++
;
nxsel
++
;
}
else
{
}
else
{
...
@@ -8852,7 +8860,7 @@ fprintf(stderr, "PRELOOP: CreateNotify: 0x%x %d xselectinput\n", win2, n1);
...
@@ -8852,7 +8860,7 @@ fprintf(stderr, "PRELOOP: CreateNotify: 0x%x %d xselectinput\n", win2, n1);
win2
=
ev
.
xreparent
.
window
;
win2
=
ev
.
xreparent
.
window
;
if
(
win2
!=
rootwin
)
{
if
(
win2
!=
rootwin
)
{
idx
=
lookup_win_index
(
win2
);
idx
=
lookup_win_index
(
win2
);
fprintf
(
stderr
,
"PRELOOP: RepartNotify: 0x%x %d idx=%d
\n
"
,
win2
,
n1
,
idx
);
fprintf
(
stderr
,
"PRELOOP: RepartNotify: 0x%
l
x %d idx=%d
\n
"
,
win2
,
n1
,
idx
);
if
(
idx
>=
0
)
{
if
(
idx
>=
0
)
{
DELETE
(
idx
);
DELETE
(
idx
);
}
}
...
@@ -8914,7 +8922,7 @@ fprintf(stderr, "\n"); rfbLog("IN check_ncache() %d events. %.4f\n", n, now -
...
@@ -8914,7 +8922,7 @@ fprintf(stderr, "\n"); rfbLog("IN check_ncache() %d events. %.4f\n", n, now -
for
(
n2
=
0
;
n2
<
n
;
n2
++
)
{
for
(
n2
=
0
;
n2
<
n
;
n2
++
)
{
if
(
Ev_unmap
[
n2
]
==
twin
)
{
if
(
Ev_unmap
[
n2
]
==
twin
)
{
if
(
skipwins_n
<
skipwins_max
)
{
if
(
skipwins_n
<
skipwins_max
)
{
fprintf
(
stderr
,
"SKIPWINS: Ev_unmap/map: 0x%x %d
\n
"
,
twin
,
n2
);
fprintf
(
stderr
,
"SKIPWINS: Ev_unmap/map: 0x%
l
x %d
\n
"
,
twin
,
n2
);
skipwins
[
skipwins_n
++
]
=
twin
;
skipwins
[
skipwins_n
++
]
=
twin
;
break
;
break
;
}
}
...
@@ -9045,7 +9053,7 @@ fprintf(stderr, "SKIPWINS: Ev_unmap/map: 0x%x %d\n", twin, n2);
...
@@ -9045,7 +9053,7 @@ fprintf(stderr, "SKIPWINS: Ev_unmap/map: 0x%x %d\n", twin, n2);
su_fix_cnt
=
0
;
su_fix_cnt
=
0
;
for
(
k
=
0
;
k
<
skipwins_n
;
k
++
)
{
for
(
k
=
0
;
k
<
skipwins_n
;
k
++
)
{
fprintf
(
stderr
,
"skipwins[%d] 0x%x
\n
"
,
k
,
skipwins
[
k
]);
fprintf
(
stderr
,
"skipwins[%d] 0x%
l
x
\n
"
,
k
,
skipwins
[
k
]);
}
}
X_LOCK
;
X_LOCK
;
...
@@ -9076,7 +9084,7 @@ for (k = 0; k < skipwins_n; k++) {
...
@@ -9076,7 +9084,7 @@ for (k = 0; k < skipwins_n; k++) {
}
}
}
}
if
(
skip
)
{
if
(
skip
)
{
fprintf
(
stderr
,
"skip%02d: ** SpecialSkip 0x%
x/0x%x type: %s
\n
"
,
ik
,
(
unsigned
int
)
win
,
(
unsigned
int
)
win2
,
Etype
(
type
));
fprintf
(
stderr
,
"skip%02d: ** SpecialSkip 0x%
lx/0x%lx type: %s
\n
"
,
ik
,
win
,
win2
,
Etype
(
type
));
continue
;
continue
;
}
}
...
@@ -9107,16 +9115,16 @@ fprintf(stderr, "skip%02d: ** SpecialSkip 0x%x/0x%x type: %s\n", ik, (unsigned
...
@@ -9107,16 +9115,16 @@ fprintf(stderr, "skip%02d: ** SpecialSkip 0x%x/0x%x type: %s\n", ik, (unsigned
create_cnt
++
;
create_cnt
++
;
}
}
}
}
fprintf
(
stderr
,
"root%02d: ** CreateNotify 0x%
x %3d -- %dx%d+%d+%d valid=%d
\n
"
,
ik
,
(
unsigned
int
)
win2
,
idx
,
w
,
h
,
x
,
y
,
valid
);
fprintf
(
stderr
,
"root%02d: ** CreateNotify 0x%
lx %3d -- %dx%d+%d+%d valid=%d
\n
"
,
ik
,
win2
,
idx
,
w
,
h
,
x
,
y
,
valid
);
}
else
if
(
type
==
ReparentNotify
)
{
}
else
if
(
type
==
ReparentNotify
)
{
if
(
ev
.
xreparent
.
parent
!=
rootwin
)
{
if
(
ev
.
xreparent
.
parent
!=
rootwin
)
{
win2
=
ev
.
xreparent
.
window
;
win2
=
ev
.
xreparent
.
window
;
idx
=
lookup_win_index
(
win2
);
idx
=
lookup_win_index
(
win2
);
fprintf
(
stderr
,
"root%02d: ReparentNotifyRM 0x%
x %3d
\n
"
,
ik
,
(
unsigned
int
)
win2
,
idx
);
fprintf
(
stderr
,
"root%02d: ReparentNotifyRM 0x%
lx %3d
\n
"
,
ik
,
win2
,
idx
);
}
}
}
else
{
}
else
{
fprintf
(
stderr
,
"root%02d: ** IgnoringRoot 0x%
x type: %s
\n
"
,
ik
,
(
unsigned
int
)
win
,
Etype
(
type
));
fprintf
(
stderr
,
"root%02d: ** IgnoringRoot 0x%
lx type: %s
\n
"
,
ik
,
win
,
Etype
(
type
));
}
}
}
else
{
}
else
{
if
(
type
==
ConfigureNotify
)
{
if
(
type
==
ConfigureNotify
)
{
...
@@ -9131,8 +9139,8 @@ fprintf(stderr, "root%02d: ** IgnoringRoot 0x%x type: %s\n", ik, (unsigned int)
...
@@ -9131,8 +9139,8 @@ fprintf(stderr, "root%02d: ** IgnoringRoot 0x%x type: %s\n", ik, (unsigned int)
oabove
=
cache_list
[
idx
].
above
;
oabove
=
cache_list
[
idx
].
above
;
}
}
fprintf
(
stderr
,
"----%02d: ConfigureNotify 0x%
x %3d -- above: 0x%x -> 0x%x %dx%d+%d+%d
\n
"
,
ik
,
(
unsigned
int
)
win
,
idx
,
fprintf
(
stderr
,
"----%02d: ConfigureNotify 0x%
lx %3d -- above: 0x%lx -> 0x%lx %dx%d+%d+%d
\n
"
,
ik
,
win
,
idx
,
(
unsigned
int
)
oabove
,
(
unsigned
int
)
ev
.
xconfigure
.
above
,
ev
.
xconfigure
.
width
,
ev
.
xconfigure
.
height
,
ev
.
xconfigure
.
x
,
ev
.
xconfigure
.
y
);
oabove
,
ev
.
xconfigure
.
above
,
ev
.
xconfigure
.
width
,
ev
.
xconfigure
.
height
,
ev
.
xconfigure
.
x
,
ev
.
xconfigure
.
y
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
continue
;
continue
;
...
@@ -9151,12 +9159,12 @@ fprintf(stderr, "----%02d: ConfigureNotify 0x%x %3d -- above: 0x%x -> 0x%x %
...
@@ -9151,12 +9159,12 @@ fprintf(stderr, "----%02d: ConfigureNotify 0x%x %3d -- above: 0x%x -> 0x%x %
if
(
x_old
!=
x_new
||
y_old
!=
y_new
)
{
if
(
x_old
!=
x_new
||
y_old
!=
y_new
)
{
/* invalidate su */
/* invalidate su */
cache_list
[
idx
].
su_time
=
0
.
0
;
cache_list
[
idx
].
su_time
=
0
.
0
;
fprintf
(
stderr
,
" INVALIDATE su: 0x%
x xy: +%d+%d +%d+%d
\n
"
,
(
unsigned
int
)
win
,
x_old
,
y_old
,
x_new
,
y_new
);
fprintf
(
stderr
,
" INVALIDATE su: 0x%
lx xy: +%d+%d +%d+%d
\n
"
,
win
,
x_old
,
y_old
,
x_new
,
y_new
);
}
}
if
(
w_old
!=
w_new
||
h_old
!=
h_new
)
{
if
(
w_old
!=
w_new
||
h_old
!=
h_new
)
{
/* invalidate bs */
/* invalidate bs */
cache_list
[
idx
].
bs_time
=
0
.
0
;
cache_list
[
idx
].
bs_time
=
0
.
0
;
fprintf
(
stderr
,
" INVALIDATE bs: 0x%
x wh: %dx%d %dx%d
\n
"
,
(
unsigned
int
)
win
,
w_old
,
h_old
,
w_new
,
h_new
);
fprintf
(
stderr
,
" INVALIDATE bs: 0x%
lx wh: %dx%d %dx%d
\n
"
,
win
,
w_old
,
h_old
,
w_new
,
h_new
);
}
}
stack_change
=
0
;
stack_change
=
0
;
...
@@ -9177,7 +9185,7 @@ fprintf(stderr, " INVALIDATE bs: 0x%x wh: %dx%d %dx%d \n", (unsigned
...
@@ -9177,7 +9185,7 @@ fprintf(stderr, " INVALIDATE bs: 0x%x wh: %dx%d %dx%d \n", (unsigned
if
(
n_MN
==
0
&&
n_UN
==
0
)
{
if
(
n_MN
==
0
&&
n_UN
==
0
)
{
if
(
su_fix_cnt
>
0
)
{
if
(
su_fix_cnt
>
0
)
{
ok
=
0
;
ok
=
0
;
fprintf
(
stderr
,
" CONF_IGNORE: Too many stacking changes: 0x%
x
\n
"
,
(
unsigned
int
)
win
);
fprintf
(
stderr
,
" CONF_IGNORE: Too many stacking changes: 0x%
lx
\n
"
,
win
);
}
}
}
}
...
@@ -9205,7 +9213,7 @@ fprintf(stderr, " CONF_IGNORE: Too many stacking changes: 0x%x\n", (uns
...
@@ -9205,7 +9213,7 @@ fprintf(stderr, " CONF_IGNORE: Too many stacking changes: 0x%x\n", (uns
}
else
if
(
type
==
VisibilityNotify
)
{
}
else
if
(
type
==
VisibilityNotify
)
{
int
state
=
ev
.
xvisibility
.
state
;
int
state
=
ev
.
xvisibility
.
state
;
idx
=
lookup_win_index
(
win
);
idx
=
lookup_win_index
(
win
);
fprintf
(
stderr
,
"----%02d: VisibilityNotify 0x%
x %3d state: %s U/P %d/%d
\n
"
,
ik
,
(
unsigned
int
)
win
,
idx
,
VState
(
state
),
n_VN_u
,
n_VN_p
);
fprintf
(
stderr
,
"----%02d: VisibilityNotify 0x%
lx %3d state: %s U/P %d/%d
\n
"
,
ik
,
win
,
idx
,
VState
(
state
),
n_VN_u
,
n_VN_p
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
continue
;
continue
;
...
@@ -9215,7 +9223,7 @@ fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", i
...
@@ -9215,7 +9223,7 @@ fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", i
}
else
if
(
macosx_console
&&
n_VN_p
==
0
)
{
}
else
if
(
macosx_console
&&
n_VN_p
==
0
)
{
;
/* XXXX not working well yet with UnmapNotify ... */
;
/* XXXX not working well yet with UnmapNotify ... */
}
else
if
(
state
==
VisibilityUnobscured
)
{
}
else
if
(
state
==
VisibilityUnobscured
)
{
int
i2
,
ok
=
1
;
int
ok
=
1
;
if
(
ncache
<=
2
)
{
if
(
ncache
<=
2
)
{
ok
=
0
;
ok
=
0
;
}
else
if
(
ev_lookup
(
win
,
EV_MAP
))
{
}
else
if
(
ev_lookup
(
win
,
EV_MAP
))
{
...
@@ -9277,7 +9285,7 @@ fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", i
...
@@ -9277,7 +9285,7 @@ fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", i
}
else
if
(
type
==
MapNotify
)
{
}
else
if
(
type
==
MapNotify
)
{
idx
=
lookup_win_index
(
win
);
idx
=
lookup_win_index
(
win
);
fprintf
(
stderr
,
"----%02d: MapNotify 0x%
x %3d
\n
"
,
ik
,
(
unsigned
int
)
win
,
idx
);
fprintf
(
stderr
,
"----%02d: MapNotify 0x%
lx %3d
\n
"
,
ik
,
win
,
idx
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
continue
;
continue
;
...
@@ -9370,7 +9378,7 @@ fprintf(stderr, "----%02d: MapNotify 0x%x %3d\n", ik, (unsigned int) win
...
@@ -9370,7 +9378,7 @@ fprintf(stderr, "----%02d: MapNotify 0x%x %3d\n", ik, (unsigned int) win
}
else
if
(
type
==
UnmapNotify
)
{
}
else
if
(
type
==
UnmapNotify
)
{
int
x2
,
y2
,
w2
,
h2
;
int
x2
,
y2
,
w2
,
h2
;
idx
=
lookup_win_index
(
win
);
idx
=
lookup_win_index
(
win
);
fprintf
(
stderr
,
"----%02d: UnmapNotify 0x%
x %3d
\n
"
,
ik
,
(
unsigned
int
)
win
,
idx
);
fprintf
(
stderr
,
"----%02d: UnmapNotify 0x%
lx %3d
\n
"
,
ik
,
win
,
idx
);
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
continue
;
continue
;
...
@@ -9452,20 +9460,20 @@ fprintf(stderr, "----%02d: UnmapNotify 0x%x %3d\n", ik, (unsigned int) win
...
@@ -9452,20 +9460,20 @@ fprintf(stderr, "----%02d: UnmapNotify 0x%x %3d\n", ik, (unsigned int) win
win2
=
ev
.
xreparent
.
window
;
win2
=
ev
.
xreparent
.
window
;
if
(
win2
!=
rootwin
)
{
if
(
win2
!=
rootwin
)
{
idx
=
lookup_win_index
(
win2
);
idx
=
lookup_win_index
(
win2
);
fprintf
(
stderr
,
"----%02d: ReparentNotifyRM 0x%
x %3d
\n
"
,
ik
,
(
unsigned
int
)
win2
,
idx
);
fprintf
(
stderr
,
"----%02d: ReparentNotifyRM 0x%
lx %3d
\n
"
,
ik
,
win2
,
idx
);
}
}
}
}
}
else
if
(
type
==
DestroyNotify
)
{
}
else
if
(
type
==
DestroyNotify
)
{
win2
=
ev
.
xdestroywindow
.
window
;
win2
=
ev
.
xdestroywindow
.
window
;
idx
=
lookup_win_index
(
win2
);
idx
=
lookup_win_index
(
win2
);
fprintf
(
stderr
,
"----%02d: DestroyNotify 0x%
x %3d
\n
"
,
ik
,
(
unsigned
int
)
win2
,
idx
);
fprintf
(
stderr
,
"----%02d: DestroyNotify 0x%
lx %3d
\n
"
,
ik
,
win2
,
idx
);
if
(
idx
>=
0
)
{
if
(
idx
>=
0
)
{
DELETE
(
idx
);
DELETE
(
idx
);
}
}
}
else
{
}
else
{
fprintf
(
stderr
,
"igno%02d: ** Ignoring 0x%
x type: %s
\n
"
,
ik
,
(
unsigned
int
)
win
,
Etype
(
type
));
fprintf
(
stderr
,
"igno%02d: ** Ignoring 0x%
lx type: %s
\n
"
,
ik
,
win
,
Etype
(
type
));
}
}
}
}
...
...
x11vnc/x11vnc.1
View file @
5b3e420c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2007" "x11vnc " "User Commands"
.TH X11VNC "1" "January 2007" "x11vnc " "User Commands"
.SH NAME
.SH NAME
x11vnc - allow VNC connections to real X11 displays
x11vnc - allow VNC connections to real X11 displays
version: 0.8.4, lastmod: 2007-01-0
8
version: 0.8.4, lastmod: 2007-01-0
9
.SH SYNOPSIS
.SH SYNOPSIS
.B x11vnc
.B x11vnc
[OPTION]...
[OPTION]...
...
...
x11vnc/x11vnc_defs.c
View file @
5b3e420c
...
@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
...
@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int
xdamage_base_event_type
=
0
;
int
xdamage_base_event_type
=
0
;
/* date +'lastmod: %Y-%m-%d' */
/* date +'lastmod: %Y-%m-%d' */
char
lastmod
[]
=
"0.8.4 lastmod: 2007-01-0
8
"
;
char
lastmod
[]
=
"0.8.4 lastmod: 2007-01-0
9
"
;
/* X display info */
/* X display info */
...
...
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