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
819fe41b
Commit
819fe41b
authored
Jan 31, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings.
parent
c1b4a3b9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
33 deletions
+45
-33
README
x11vnc/README
+1
-1
keyboard.c
x11vnc/keyboard.c
+1
-0
pointer.c
x11vnc/pointer.c
+1
-0
screen.c
x11vnc/screen.c
+9
-7
solid.c
x11vnc/solid.c
+0
-2
userinput.c
x11vnc/userinput.c
+30
-23
xdamage.c
x11vnc/xdamage.c
+2
-0
xevents.c
x11vnc/xevents.c
+1
-0
No files found.
x11vnc/README
View file @
819fe41b
x11vnc
README
file
Date
:
Wed
Jan
31
1
0
:
08
:
11
EST
2007
x11vnc
README
file
Date
:
Wed
Jan
31
1
1
:
51
:
38
EST
2007
The
following
information
is
taken
from
these
URLs
:
...
...
x11vnc/keyboard.c
View file @
819fe41b
...
...
@@ -15,6 +15,7 @@
#include "linuxfb.h"
#include "uinput.h"
#include "macosx.h"
#include "screen.h"
void
get_keystate
(
int
*
keystate
);
void
clear_modifiers
(
int
init
);
...
...
x11vnc/pointer.c
View file @
819fe41b
...
...
@@ -16,6 +16,7 @@
#include "uinput.h"
#include "scan.h"
#include "macosx.h"
#include "screen.h"
int
pointer_queued_sent
=
0
;
...
...
x11vnc/screen.c
View file @
819fe41b
...
...
@@ -847,6 +847,7 @@ static void initialize_snap_fb(void) {
rfbClient
*
client
=
NULL
;
void
vnc_reflect_bell
(
rfbClient
*
cl
)
{
if
(
cl
)
{}
if
(
sound_bell
)
{
if
(
unixpw_in_progress
)
{
return
;
...
...
@@ -863,6 +864,7 @@ void vnc_reflect_bell(rfbClient *cl) {
}
void
vnc_reflect_recv_cuttext
(
rfbClient
*
cl
,
const
char
*
str
,
int
len
)
{
if
(
cl
)
{}
if
(
unixpw_in_progress
)
{
return
;
}
...
...
@@ -877,6 +879,7 @@ void vnc_reflect_recv_cuttext(rfbClient *cl, const char *str, int len) {
}
void
vnc_reflect_got_update
(
rfbClient
*
cl
,
int
x
,
int
y
,
int
w
,
int
h
)
{
if
(
cl
)
{}
if
(
use_xdamage
)
{
static
int
first
=
1
;
if
(
first
)
{
...
...
@@ -890,12 +893,12 @@ void vnc_reflect_got_update(rfbClient *cl, int x, int y, int w, int h) {
void
vnc_reflect_got_cursorshape
(
rfbClient
*
cl
,
int
xhot
,
int
yhot
,
int
width
,
int
height
,
int
bytesPerPixel
)
{
static
int
serial
=
1
;
int
i
,
j
;
char
*
bitmap
,
*
rich
,
*
alpha
;
char
*
pixels
=
NULL
;
unsigned
long
r
,
g
,
b
,
a
;
unsigned
int
ui
;
unsigned
long
r
,
g
,
b
;
unsigned
int
ui
=
0
;
unsigned
long
red_mask
,
green_mask
,
blue_mask
;
if
(
cl
)
{}
if
(
unixpw_in_progress
)
{
return
;
}
...
...
@@ -959,6 +962,7 @@ void vnc_reflect_got_copyrect(rfbClient *cl, int src_x, int src_y, int w, int h,
sraRegionPtr
reg
;
int
dx
,
dy
,
rc
=
-
1
;
static
int
last_dx
=
0
,
last_dy
=
0
;
if
(
cl
)
{}
if
(
unixpw_in_progress
)
{
return
;
}
...
...
@@ -1051,11 +1055,11 @@ char *vnc_reflect_guess(char *str, char **raw_fb_addr) {
red_mask
=
(
client
->
format
.
redMax
<<
client
->
format
.
redShift
);
green_mask
=
(
client
->
format
.
greenMax
<<
client
->
format
.
greenShift
);
blue_mask
=
(
client
->
format
.
blueMax
<<
client
->
format
.
blueShift
);
sprintf
(
str2
,
"map:/dev/null@%dx%dx%d:0x%
x/0x%x/0x%
x"
,
sprintf
(
str2
,
"map:/dev/null@%dx%dx%d:0x%
lx/0x%lx/0x%l
x"
,
client
->
width
,
client
->
height
,
client
->
format
.
bitsPerPixel
,
red_mask
,
green_mask
,
blue_mask
);
}
*
raw_fb_addr
=
client
->
frameBuffer
;
*
raw_fb_addr
=
(
char
*
)
client
->
frameBuffer
;
free
(
str0
);
if
(
first
)
{
...
...
@@ -1071,7 +1075,6 @@ char *vnc_reflect_guess(char *str, char **raw_fb_addr) {
}
rfbBool
vnc_reflect_send_pointer
(
int
x
,
int
y
,
int
mask
)
{
rfbBool
ret
;
int
rc
;
if
(
mask
>=
0
)
{
got_user_input
++
;
...
...
@@ -1106,7 +1109,6 @@ rfbBool vnc_reflect_send_cuttext(char *str, int len) {
void
vnc_reflect_process_client
(
void
)
{
int
num
;
rfbBool
save
;
if
(
client
==
NULL
)
{
return
;
}
...
...
x11vnc/solid.c
View file @
819fe41b
...
...
@@ -155,8 +155,6 @@ XImage *solid_root(char *color) {
XSetWindowAttributes
swa
;
Visual
visual
;
static
unsigned
long
mask
,
pixel
=
0
;
XColor
cdef
;
Colormap
cmap
;
RAWFB_RET
(
NULL
)
...
...
x11vnc/userinput.c
View file @
819fe41b
...
...
@@ -3153,8 +3153,10 @@ static int try_copyrect(Window orig_frame, Window frame, int x, int y, int w, in
}
if
(
db2
)
fprintf
(
stderr
,
"try_copyrect: 0x%lx/0x%lx bad: %d stack_list_num: %d
\n
"
,
orig_frame
,
frame
,
dt_bad
,
stack_list_num
);
#if 0
/* XXX Y */
//dt_bad = 0;
#endif
if
(
dt_bad
&&
wireframe_in_progress
)
{
sraRegionPtr
rect
;
...
...
@@ -3784,7 +3786,7 @@ void ncache_pre_portions(Window orig_frame, Window frame, int *nidx_in, int try_
dx
=
0
;
dy
=
dpy_y
;
sraRgnOffset
(
r2
,
dx
,
dy
);
//
fprintf(stderr, "FB_COPY: %.4f 1) offscreen check:\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 1) offscreen check:
\n
"
,
dnow
()
-
ntim
);
/* 0) save it in the invalid (offscreen) SU portion */
if
(
!
*
use_batch
)
{
...
...
@@ -3809,11 +3811,11 @@ void ncache_pre_portions(Window orig_frame, Window frame, int *nidx_in, int try_
dy
=
bs_y
-
y
;
sraRgnOffset
(
r1
,
dx
,
dy
);
//
fprintf(stderr, "FB_COPY: %.4f 1) use tmp bs:\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 1) use tmp bs:
\n
"
,
dnow
()
-
ntim
);
if
(
!
*
use_batch
)
{
do_copyregion
(
r1
,
dx
,
dy
,
0
);
if
(
!
fb_push_wait
(
0
.
2
,
FB_COPY
))
{
//
fprintf(stderr, "FB_COPY: %.4f 1) FAILED.\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 1) FAILED.
\n
"
,
dnow
()
-
ntim
);
fb_push_wait
(
0
.
1
,
FB_COPY
);
}
}
else
{
...
...
@@ -3844,7 +3846,7 @@ void ncache_post_portions(int nidx, int use_batch, int orig_x, int orig_y, int o
int
bs_h
=
cache_list
[
nidx
].
bs_h
;
int
some_su
=
0
;
//
fprintf(stderr, "su: %dx%d+%d+%d bs: %dx%d+%d+%d\n", su_w, su_h, su_x, su_y, bs_w, bs_h, bs_x, bs_y);
if
(
0
)
fprintf
(
stderr
,
"su: %dx%d+%d+%d bs: %dx%d+%d+%d
\n
"
,
su_w
,
su_h
,
su_x
,
su_y
,
bs_w
,
bs_h
,
bs_x
,
bs_y
);
if
(
bs_x
<
0
)
{
if
(
!
find_rect
(
nidx
,
x
,
y
,
w
,
h
))
{
...
...
@@ -3912,13 +3914,13 @@ void ncache_post_portions(int nidx, int use_batch, int orig_x, int orig_y, int o
dx
=
orig_x
-
su_x
;
dy
=
orig_y
-
su_y
;
//
fprintf(stderr, "FB_COPY: %.4f 3) sent_copyrect: su_restore: %d %d\n", dnow() - ntim, dx, dy);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 3) sent_copyrect: su_restore: %d %d
\n
"
,
dnow
()
-
ntim
,
dx
,
dy
);
if
(
cache_list
[
nidx
].
su_time
==
0
.
0
)
{
;
}
else
if
(
!
use_batch
)
{
do_copyregion
(
r1
,
dx
,
dy
,
0
);
if
(
!
fb_push_wait
(
0
.
2
,
FB_COPY
))
{
//
fprintf(stderr, "FB_COPY: %.4f 3) FAILED.\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 3) FAILED.
\n
"
,
dnow
()
-
ntim
);
fb_push_wait
(
0
.
1
,
FB_COPY
);
}
}
else
{
...
...
@@ -3926,7 +3928,7 @@ void ncache_post_portions(int nidx, int use_batch, int orig_x, int orig_y, int o
batch_dys
[
NPP_nreg
]
=
dy
;
batch_reg
[
NPP_nreg
++
]
=
sraRgnCreateRgn
(
r1
);
}
//
fprintf(stderr, "sent_copyrect: %.4f su_restore: done.\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"sent_copyrect: %.4f su_restore: done.
\n
"
,
dnow
()
-
ntim
);
sraRgnDestroy
(
r0
);
sraRgnDestroy
(
r1
);
sraRgnDestroy
(
r2
);
...
...
@@ -3953,11 +3955,11 @@ void ncache_post_portions(int nidx, int use_batch, int orig_x, int orig_y, int o
dx
=
dx
-
dx2
;
dy
=
dy
-
dy2
;
//
fprintf(stderr, "FB_COPY: %.4f 4) move overlap inside su:\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 4) move overlap inside su:
\n
"
,
dnow
()
-
ntim
);
if
(
!
use_batch
)
{
do_copyregion
(
r3
,
dx
,
dy
,
0
);
if
(
!
fb_push_wait
(
0
.
2
,
FB_COPY
))
{
//
fprintf(stderr, "FB_COPY: %.4f 4) FAILED.\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 4) FAILED.
\n
"
,
dnow
()
-
ntim
);
fb_push_wait
(
0
.
1
,
FB_COPY
);
}
}
else
{
...
...
@@ -3984,11 +3986,11 @@ void ncache_post_portions(int nidx, int use_batch, int orig_x, int orig_y, int o
sraRgnSubtract
(
r1
,
r3
);
sraRgnDestroy
(
r3
);
}
//
fprintf(stderr, "FB_COPY: %.4f 5) move tmp bs to su:\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 5) move tmp bs to su:
\n
"
,
dnow
()
-
ntim
);
if
(
!
use_batch
)
{
do_copyregion
(
r1
,
dx
,
dy
,
0
);
if
(
!
fb_push_wait
(
0
.
2
,
FB_COPY
))
{
//
fprintf(stderr, "FB_COPY: %.4f 5) FAILED.\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 5) FAILED.
\n
"
,
dnow
()
-
ntim
);
fb_push_wait
(
0
.
1
,
FB_COPY
);
}
}
else
{
...
...
@@ -4008,11 +4010,11 @@ void ncache_post_portions(int nidx, int use_batch, int orig_x, int orig_y, int o
dx
=
bs_x
-
x
;
dy
=
bs_y
-
y
;
sraRgnOffset
(
r1
,
dx
,
dy
);
//
fprintf(stderr, "FB_COPY: %.4f 6) snapshot bs:\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 6) snapshot bs:
\n
"
,
dnow
()
-
ntim
);
if
(
!
use_batch
)
{
do_copyregion
(
r1
,
dx
,
dy
,
0
);
if
(
!
fb_push_wait
(
0
.
2
,
FB_COPY
))
{
//
fprintf(stderr, "FB_COPY: %.4f 6) FAILED.\n", dnow() - ntim);
if
(
0
)
fprintf
(
stderr
,
"FB_COPY: %.4f 6) FAILED.
\n
"
,
dnow
()
-
ntim
);
fb_push_wait
(
0
.
1
,
FB_COPY
);
}
}
else
{
...
...
@@ -4172,7 +4174,7 @@ if (0) fprintf(stderr, "FAW orig_frame unmapped.\n");
void
check_macosx_click_frame
(
void
)
{
#ifdef MACOSX
if
(
macosx_console
)
{
//
fprintf(stderr, "macosx_click_frame: 0x%x\n", macosx_click_frame);
if
(
0
)
fprintf
(
stderr
,
"macosx_click_frame: 0x%x
\n
"
,
macosx_click_frame
);
check_macosx_iconify
(
macosx_click_frame
,
None
,
0
);
macosx_click_frame
=
None
;
if
(
button_mask
&&
!
macosx_checkevent
(
NULL
))
{
...
...
@@ -4297,6 +4299,7 @@ int check_wireframe(void) {
DB_SET
if
(
unixpw_in_progress
)
return
0
;
if
(
copyrect_drag_delay
)
{}
#ifdef MACOSX
if
(
macosx_console
)
{
...
...
@@ -4690,7 +4693,7 @@ if (db) fprintf(stderr, "FRAME MOVE 1st-dt: %.3f\n", first_dt_ave/n);
int
drawit
=
0
;
if
(
x
!=
box_x
||
y
!=
box_y
)
{
/* moved since last */
//
fprintf(stderr, "DRAW1 %d %d\n", x - box_x, y - box_y);
if
(
0
)
fprintf
(
stderr
,
"DRAW1 %d %d
\n
"
,
x
-
box_x
,
y
-
box_y
);
drawit
=
1
;
}
else
if
(
w
!=
box_w
||
h
!=
box_h
)
{
/* resize since last */
...
...
@@ -5832,7 +5835,7 @@ int lookup_win_index(Window win) {
int
k2
=
recidx
[
k
];
if
(
cache_list
[
k2
].
win
==
win
)
{
idx
=
k2
;
//
fprintf(stderr, "recentA(shortcut): %d 0x%x\n", idx, win);
if
(
0
)
fprintf
(
stderr
,
"recentA(shortcut): %d 0x%x
\n
"
,
idx
,
win
);
s1
++
;
break
;
}
...
...
@@ -5846,7 +5849,7 @@ int lookup_win_index(Window win) {
}
if
(
cache_list
[
k
].
win
==
win
)
{
idx
=
k
;
//
fprintf(stderr, "recentB(normal): %d 0x%x\n", idx, win);
if
(
0
)
fprintf
(
stderr
,
"recentB(normal): %d 0x%x
\n
"
,
idx
,
win
);
s2
++
;
break
;
}
...
...
@@ -6854,7 +6857,7 @@ fprintf(stderr, ">>**--**>> found rect via GRID: %dx%d+%d+%d -- %d %d\n", w, h,
fr_FAILt
++
;
return
0
;
}
else
{
//
fprintf(stderr, ">>**--**>> found rect: %dx%d+%d+%d -- %d %d\n", w, h, x, y, x_hit, y_hit);
if
(
0
)
fprintf
(
stderr
,
">>**--**>> found rect: %dx%d+%d+%d -- %d %d
\n
"
,
w
,
h
,
x
,
y
,
x_hit
,
y_hit
);
}
if
(
zero_rects
)
{
...
...
@@ -6965,7 +6968,7 @@ int clipped(int idx) {
r2
=
sraRgnCreateRect
(
xc
,
yc
,
xc
+
wc
,
yc
+
hc
);
sraRgnAnd
(
r2
,
r0
);
if
(
sraRgnAnd
(
r2
,
r1
))
{
//
fprintf(stderr, "clip[0x%x]: 0x%x, %d/%d\n", win, cache_list[idx2].win, ic, idx2);
if
(
0
)
fprintf
(
stderr
,
"clip[0x%x]: 0x%x, %d/%d
\n
"
,
win
,
cache_list
[
idx2
].
win
,
ic
,
idx2
);
clip
=
1
;
}
sraRgnDestroy
(
r2
);
...
...
@@ -6975,7 +6978,7 @@ int clipped(int idx) {
}
sraRgnDestroy
(
r0
);
sraRgnDestroy
(
r1
);
//
fprintf(stderr, "clip[0x%x]: %s\n", win, clip ? "clipped" : "no-clipped");
if
(
0
)
fprintf
(
stderr
,
"clip[0x%x]: %s
\n
"
,
win
,
clip
?
"clipped"
:
"no-clipped"
);
return
clip
;
}
...
...
@@ -6985,7 +6988,7 @@ void clip_region(sraRegionPtr r, Window win) {
for
(
ic
=
old_stack_n
-
1
;
ic
>=
0
;
ic
--
)
{
int
xc
,
yc
,
wc
,
hc
;
//
fprintf(stderr, "----[0x%x]: 0x%x, %d %d\n", win, old_stack[ic], ic, old_stack_mapped[ic]);
if
(
0
)
fprintf
(
stderr
,
"----[0x%x]: 0x%x, %d %d
\n
"
,
win
,
old_stack
[
ic
],
ic
,
old_stack_mapped
[
ic
]);
if
(
old_stack
[
ic
]
==
win
)
{
break
;
}
...
...
@@ -7009,7 +7012,7 @@ void clip_region(sraRegionPtr r, Window win) {
r1
=
sraRgnCreateRect
(
xc
,
yc
,
xc
+
wc
,
yc
+
hc
);
if
(
sraRgnAnd
(
r1
,
r
))
{
sraRgnSubtract
(
r
,
r1
);
//
fprintf(stderr, "clip[0x%x]: 0x%x, %d/%d\n", win, cache_list[idx2].win, ic, idx2);
if
(
0
)
fprintf
(
stderr
,
"clip[0x%x]: 0x%x, %d/%d
\n
"
,
win
,
cache_list
[
idx2
].
win
,
ic
,
idx2
);
}
sraRgnDestroy
(
r1
);
}
...
...
@@ -8374,7 +8377,7 @@ int try_to_synthesize_su(int force, int urgent, int *nbatch) {
if
(
attr
.
map_state
!=
IsViewable
)
{
continue
;
}
//
fprintf(stderr, "win: 0x%lx %d idx=%d\n", win, i, idx);
if
(
0
)
fprintf
(
stderr
,
"win: 0x%lx %d idx=%d
\n
"
,
win
,
i
,
idx
);
x2
=
attr
.
x
;
y2
=
attr
.
y
;
...
...
@@ -9823,7 +9826,9 @@ fprintf(stderr, "----%02d: MapNotify 0x%lx %3d\n", ik, win, idx);
continue
;
}
#if 0
// if (cache_list[idx].map_state == IsUnmapped || desktop_change || macosx_console)
#endif
if
(
1
)
{
X_UNLOCK
;
if
(
desktop_change
)
{
...
...
@@ -9921,7 +9926,9 @@ fprintf(stderr, "----%02d: UnmapNotify 0x%lx %3d\n", ik, win, idx);
}
}
#if 0
// if (cache_list[idx].map_state == IsViewable || desktop_change || macosx_console)
#endif
if
(
1
)
{
X_UNLOCK
;
if
(
desktop_change
)
{
...
...
x11vnc/xdamage.c
View file @
819fe41b
...
...
@@ -558,9 +558,11 @@ int xdamage_hint_skip(int y) {
int
fast_tmpl
=
1
;
sraRegionPtr
reg
,
tmpl
;
int
ret
,
i
,
n
,
nreg
;
#ifndef NO_NCACHE
static
int
ncache_no_skip
=
0
;
static
double
last_ncache_no_skip
=
0
.
0
;
static
double
last_ncache_no_skip_long
=
0
.
0
,
ncache_fac
=
0
.
25
;
#endif
if
(
!
xdamage_present
||
!
use_xdamage
)
{
return
0
;
/* cannot skip */
...
...
x11vnc/xevents.c
View file @
819fe41b
...
...
@@ -14,6 +14,7 @@
#include "unixpw.h"
#include "cleanup.h"
#include "macosx.h"
#include "screen.h"
/* XXX CHECK BEFORE RELEASE */
int
grab_buster
=
0
;
...
...
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