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
f9baaf1e
Commit
f9baaf1e
authored
18 years ago
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more compiler warnings cleanup.
parent
99a557d6
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
115 additions
and
45 deletions
+115
-45
8to24.c
x11vnc/8to24.c
+3
-0
README
x11vnc/README
+1
-1
cleanup.c
x11vnc/cleanup.c
+2
-0
connections.c
x11vnc/connections.c
+1
-0
cursor.c
x11vnc/cursor.c
+3
-2
macosx.c
x11vnc/macosx.c
+5
-8
macosx.h
x11vnc/macosx.h
+2
-0
macosxCG.c
x11vnc/macosxCG.c
+22
-9
macosxCG.h
x11vnc/macosxCG.h
+6
-0
macosxCGP.c
x11vnc/macosxCGP.c
+5
-4
macosxCGS.c
x11vnc/macosxCGS.c
+11
-7
macosxCGS.h
x11vnc/macosxCGS.h
+1
-0
scan.c
x11vnc/scan.c
+2
-3
screen.c
x11vnc/screen.c
+1
-0
sslhelper.c
x11vnc/sslhelper.c
+1
-1
uinput.c
x11vnc/uinput.c
+9
-2
userinput.c
x11vnc/userinput.c
+4
-5
v4l.c
x11vnc/v4l.c
+32
-2
win_utils.c
x11vnc/win_utils.c
+1
-0
xevents.c
x11vnc/xevents.c
+2
-1
xwrappers.c
x11vnc/xwrappers.c
+1
-0
No files found.
x11vnc/8to24.c
View file @
f9baaf1e
...
...
@@ -1475,6 +1475,9 @@ if (db24 > 1) fprintf(stderr, "transform %4d %4d %4d %4d cm: %d\n", rect.x1, rec
return
;
#else
attr
.
width
=
0
;
attr
.
height
=
0
;
/* now transform the pixels in this rectangle: */
n_off
=
main_bytes_per_line
*
rect
.
y1
+
pixelsize
*
rect
.
x1
;
...
...
This diff is collapsed.
Click to expand it.
x11vnc/README
View file @
f9baaf1e
x11vnc
README
file
Date
:
Thu
Dec
28
1
0
:
42
:
34
EST
2006
x11vnc
README
file
Date
:
Thu
Dec
28
1
2
:
53
:
07
EST
2006
The
following
information
is
taken
from
these
URLs
:
...
...
This diff is collapsed.
Click to expand it.
x11vnc/cleanup.c
View file @
f9baaf1e
...
...
@@ -12,6 +12,8 @@
#include "sslcmds.h"
#include "sslhelper.h"
#include "connections.h"
#include "macosx.h"
#include "macosxCG.h"
/*
* Exiting and error handling routines
...
...
This diff is collapsed.
Click to expand it.
x11vnc/connections.c
View file @
f9baaf1e
...
...
@@ -16,6 +16,7 @@
#include "sslhelper.h"
#include "xwrappers.h"
#include "xevents.h"
#include "macosx.h"
#include "macosxCG.h"
#include "userinput.h"
...
...
This diff is collapsed.
Click to expand it.
x11vnc/cursor.c
View file @
f9baaf1e
...
...
@@ -6,6 +6,7 @@
#include "screen.h"
#include "scan.h"
#include "unixpw.h"
#include "macosx.h"
int
xfixes_present
=
0
;
int
use_xfixes
=
1
;
...
...
@@ -1460,10 +1461,10 @@ int get_which_cursor(void) {
int
db
=
0
;
if
(
show_multiple_cursors
)
{
int
depth
;
int
depth
=
0
;
static
win_str_info_t
winfo
;
static
int
first
=
1
,
depth_cutoff
=
-
1
;
Window
win
;
Window
win
=
None
;
XErrorHandler
old_handler
;
int
mode
=
0
;
...
...
This diff is collapsed.
Click to expand it.
x11vnc/macosx.c
View file @
f9baaf1e
...
...
@@ -19,6 +19,7 @@
#include "allowed_input_t.h"
#include "keyboard.h"
#include "cursor.h"
#include "connections.h"
#include "macosxCG.h"
#include "macosxCGP.h"
#include "macosxCGS.h"
...
...
@@ -35,6 +36,8 @@ int macosx_valid_window(Window, XWindowAttributes*);
Status
macosx_xquerytree
(
Window
w
,
Window
*
root_return
,
Window
*
parent_return
,
Window
**
children_return
,
unsigned
int
*
nchildren_return
);
int
macosx_get_wm_frame_pos
(
int
*
px
,
int
*
py
,
int
*
x
,
int
*
y
,
int
*
w
,
int
*
h
,
Window
*
frame
,
Window
*
win
);
void
macosx_add_mapnotify
(
Window
win
,
int
level
,
int
map
);
void
macosx_add_create
(
Window
win
,
int
level
);
...
...
@@ -287,7 +290,6 @@ void init_key_table(void) {
}
void
macosx_key_command
(
rfbBool
down
,
rfbKeySym
keysym
,
rfbClientPtr
client
)
{
static
int
control
=
0
,
alt
=
0
;
allowed_input_t
input
;
if
(
debug_keyboard
)
fprintf
(
stderr
,
"macosx_key_command: %d %s
\n
"
,
(
int
)
keysym
,
down
?
"down"
:
"up"
);
...
...
@@ -301,7 +303,6 @@ void macosx_key_command(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
init_key_table
();
macosxCG_key_inject
((
int
)
down
,
(
unsigned
int
)
keysym
);
}
extern
void
macosxGCS_poll_pb
(
void
);
...
...
@@ -600,11 +601,11 @@ extern int CGS_levels[];
Status
macosx_xquerytree
(
Window
w
,
Window
*
root_return
,
Window
*
parent_return
,
Window
**
children_return
,
unsigned
int
*
nchildren_return
)
{
int
i
,
n
,
k
,
swap
;
int
win1
,
win2
;
int
i
,
n
,
k
;
*
root_return
=
(
Window
)
0
;
*
parent_return
=
(
Window
)
0
;
if
(
!
w
)
{}
macosxCGS_get_all_windows
();
...
...
@@ -685,17 +686,13 @@ int macosx_check_clipped(int win, int *list, int n) {
if
(
sraRgnAnd
(
r2
,
r1
))
{
ret
=
1
;
sraRgnDestroy
(
r2
);
//fprintf(stderr, "macosx_check_clipped: %4d %4d -- CLIP\n", win, list[k]);
break
;
}
//fprintf(stderr, "macosx_check_clipped: %4d %4d -- -no-\n", win, list[k]);
sraRgnDestroy
(
r2
);
}
sraRgnDestroy
(
r0
);
sraRgnDestroy
(
r1
);
//fprintf(stderr, "macosx_check_clipped: %4d -- CLIP: %s\n", win, ret ? "yes" : "no");
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
x11vnc/macosx.h
View file @
f9baaf1e
...
...
@@ -13,6 +13,8 @@ extern int macosx_get_cursor_pos(int *, int *);
extern
int
macosx_valid_window
(
Window
,
XWindowAttributes
*
);
extern
Status
macosx_xquerytree
(
Window
w
,
Window
*
root_return
,
Window
*
parent_return
,
Window
**
children_return
,
unsigned
int
*
nchildren_return
);
extern
int
macosx_get_wm_frame_pos
(
int
*
px
,
int
*
py
,
int
*
x
,
int
*
y
,
int
*
w
,
int
*
h
,
Window
*
frame
,
Window
*
win
);
extern
void
macosx_send_sel
(
char
*
,
int
);
extern
void
macosx_set_sel
(
char
*
,
int
);
...
...
This diff is collapsed.
Click to expand it.
x11vnc/macosxCG.c
View file @
f9baaf1e
...
...
@@ -15,6 +15,7 @@ void macosxCG_dummy(void) {}
#include <Carbon/Carbon.h>
void
macosxCG_init
(
void
);
void
macosxCG_fini
(
void
);
void
macosxCG_event_loop
(
void
);
char
*
macosxCG_get_fb_addr
(
void
);
...
...
@@ -38,7 +39,8 @@ extern int collect_macosx_damage(int x_in, int y_in, int w_in, int h_in, int cal
static
void
macosxCG_callback
(
CGRectCount
n
,
const
CGRect
*
rects
,
void
*
dum
)
{
int
i
,
db
=
0
;
if
(
db
)
fprintf
(
stderr
,
"macosx_callback: n=%d
\n
"
,
(
int
)
n
);
for
(
i
=
0
;
i
<
n
;
i
++
)
{
if
(
!
dum
)
{}
for
(
i
=
0
;
i
<
(
int
)
n
;
i
++
)
{
if
(
db
>
1
)
fprintf
(
stderr
,
" : %g %g - %g %g
\n
"
,
rects
[
i
].
origin
.
x
,
rects
[
i
].
origin
.
y
,
rects
[
i
].
size
.
width
,
rects
[
i
].
size
.
height
);
collect_macosx_damage
(
(
int
)
rects
[
i
].
origin
.
x
,
(
int
)
rects
[
i
].
origin
.
y
,
(
int
)
rects
[
i
].
size
.
width
,
(
int
)
rects
[
i
].
size
.
height
,
1
);
...
...
@@ -90,6 +92,11 @@ void macosxCG_refresh_callback_off(void) {
extern
int
macosx_noscreensaver
;
extern
void
macosxGCS_initpb
(
void
);
extern
int
macosxCGP_init_dimming
(
void
);
extern
int
macosxCGP_undim
(
void
);
extern
int
macosxCGP_dim_shutdown
(
void
);
extern
void
macosxCGP_screensaver_timer_off
(
void
);
extern
void
macosxCGP_screensaver_timer_on
(
void
);
void
macosxCG_init
(
void
)
{
if
(
displayID
==
NULL
)
{
...
...
@@ -130,6 +137,10 @@ extern int client_count, nofb;
extern
void
do_new_fb
(
int
);
extern
int
macosx_wait_for_switch
,
macosx_resize
;
extern
void
macosxGCS_poll_pb
(
void
);
extern
void
usleep
(
unsigned
long
usec
);
extern
unsigned
int
sleep
(
unsigned
int
seconds
);
void
macosxCG_event_loop
(
void
)
{
OSStatus
rc
;
int
nbpp
;
...
...
@@ -278,11 +289,11 @@ int macosxCG_get_cursor(void) {
int
last_idx
=
(
int
)
get_cursor_serial
(
1
);
int
which
=
1
;
CGError
err
;
int
datasize
,
masksize
,
row_bytes
,
cdepth
,
comps
,
bpcomp
;
int
datasize
,
row_bytes
,
cdepth
,
comps
,
bpcomp
;
CGRect
rect
;
CGPoint
hot
;
unsigned
char
*
data
;
int
res
,
cursor_seed
;
int
cursor_seed
;
static
int
last_cursor_seed
=
-
1
;
static
time_t
last_fetch
=
0
;
time_t
now
=
time
(
NULL
);
...
...
@@ -337,7 +348,7 @@ extern int macosx_swap23;
extern
int
off_x
,
coff_x
,
off_y
,
coff_y
;
void
macosxCG_pointer_inject
(
int
mask
,
int
x
,
int
y
)
{
int
swap23
=
macosx_swap23
,
rc
;
int
swap23
=
macosx_swap23
;
int
s1
=
0
,
s2
=
1
,
s3
=
2
,
s4
=
3
,
s5
=
4
;
CGPoint
loc
;
int
wheel_distance
=
macosx_mouse_wheel_speed
;
...
...
@@ -561,23 +572,25 @@ void macosxCG_init_key_table(void) {
keyTable
[
i
]
=
0xFFFF
;
keyTableMods
[
i
]
=
0
;
}
for
(
i
=
0
;
i
<
(
sizeof
(
USKeyCodes
)
/
sizeof
(
int
));
i
+=
2
)
{
for
(
i
=
0
;
i
<
(
int
)
(
sizeof
(
USKeyCodes
)
/
sizeof
(
int
));
i
+=
2
)
{
int
j
=
USKeyCodes
[
i
];
keyTable
[(
unsigned
short
)
j
]
=
(
CGKeyCode
)
USKeyCodes
[
i
+
1
];
}
for
(
i
=
0
;
i
<
(
sizeof
(
SpecialKeyCodes
)
/
sizeof
(
int
));
i
+=
2
)
{
for
(
i
=
0
;
i
<
(
int
)
(
sizeof
(
SpecialKeyCodes
)
/
sizeof
(
int
));
i
+=
2
)
{
int
j
=
SpecialKeyCodes
[
i
];
keyTable
[(
unsigned
short
)
j
]
=
(
CGKeyCode
)
SpecialKeyCodes
[
i
+
1
];
}
}
void
macosxCG_key_inject
(
int
down
,
unsigned
int
keysym
)
{
static
int
control
=
0
,
alt
=
0
;
int
pressModsForKeys
=
FALSE
;
extern
void
init_key_table
(
void
);
void
macosxCG_key_inject
(
int
down
,
unsigned
int
keysym
)
{
CGKeyCode
keyCode
=
keyTable
[(
unsigned
short
)
keysym
];
CGCharCode
keyChar
=
0
;
#if 0
int pressModsForKeys = FALSE;
UInt32 modsForKey = keyTableMods[keysym] << 8;
#endif
init_key_table
();
...
...
This diff is collapsed.
Click to expand it.
x11vnc/macosxCG.h
View file @
f9baaf1e
...
...
@@ -4,6 +4,7 @@
/* -- macosxCG.h -- */
extern
void
macosxCG_init
(
void
);
extern
void
macosxCG_fini
(
void
);
extern
void
macosxCG_event_loop
(
void
);
extern
char
*
macosxCG_get_fb_addr
(
void
);
...
...
@@ -12,6 +13,7 @@ extern int macosxCG_CGDisplayPixelsHigh(void);
extern
int
macosxCG_CGDisplayBitsPerPixel
(
void
);
extern
int
macosxCG_CGDisplayBitsPerSample
(
void
);
extern
int
macosxCG_CGDisplaySamplesPerPixel
(
void
);
extern
int
macosxCG_CGDisplayBytesPerRow
(
void
);
extern
void
macosxCG_pointer_inject
(
int
mask
,
int
x
,
int
y
);
extern
int
macosxCG_get_cursor_pos
(
int
*
x
,
int
*
y
);
...
...
@@ -19,5 +21,9 @@ extern int macosxCG_get_cursor(void);
extern
void
macosxCG_init_key_table
(
void
);
extern
void
macosxCG_key_inject
(
int
down
,
unsigned
int
keysym
);
extern
void
macosxCG_refresh_callback_off
(
void
);
extern
void
macosxCG_refresh_callback_on
(
void
);
#endif
/* _X11VNC_MACOSXCG_H */
This diff is collapsed.
Click to expand it.
x11vnc/macosxCGP.c
View file @
f9baaf1e
...
...
@@ -38,21 +38,22 @@ static EventLoopTimerUPP sstimerUPP;
static
EventLoopTimerRef
sstimer
;
void
macosxCG_screensaver_timer
(
EventLoopTimerRef
timer
,
void
*
data
)
{
if
(
0
)
fprintf
(
stderr
,
"macosxCG_screensaver_timer: %d
\n
"
,
time
(
0
));
if
(
0
)
fprintf
(
stderr
,
"macosxCG_screensaver_timer: %d
\n
"
,
(
int
)
time
(
0
));
if
(
!
timer
||
!
data
)
{}
if
(
macosx_nosleep
&&
client_count
)
{
if
(
0
)
fprintf
(
stderr
,
"UpdateSystemActivity: %d
\n
"
,
time
(
0
));
if
(
0
)
fprintf
(
stderr
,
"UpdateSystemActivity: %d
\n
"
,
(
int
)
time
(
0
));
UpdateSystemActivity
(
IdleActivity
);
}
}
void
macosxCGP_screensaver_timer_off
(
void
)
{
if
(
0
)
fprintf
(
stderr
,
"macosxCGP_screensaver_timer_off: %d
\n
"
,
time
(
0
));
if
(
0
)
fprintf
(
stderr
,
"macosxCGP_screensaver_timer_off: %d
\n
"
,
(
int
)
time
(
0
));
RemoveEventLoopTimer
(
sstimer
);
DisposeEventLoopTimerUPP
(
sstimerUPP
);
}
void
macosxCGP_screensaver_timer_on
(
void
)
{
if
(
0
)
fprintf
(
stderr
,
"macosxCGP_screensaver_timer_on: %d
\n
"
,
time
(
0
));
if
(
0
)
fprintf
(
stderr
,
"macosxCGP_screensaver_timer_on: %d
\n
"
,
(
int
)
time
(
0
));
sstimerUPP
=
NewEventLoopTimerUPP
(
macosxCG_screensaver_timer
);
InstallEventLoopTimer
(
GetMainEventLoop
(),
kEventDurationSecond
*
30
,
kEventDurationSecond
*
30
,
sstimerUPP
,
NULL
,
&
sstimer
);
...
...
This diff is collapsed.
Click to expand it.
x11vnc/macosxCGS.c
View file @
f9baaf1e
...
...
@@ -132,11 +132,13 @@ int macosxCGS_find_index(int w) {
return
-
1
;
}
extern
void
usleep
(
unsigned
long
usec
);
int
macosxCGS_follow_animation_win
(
int
win
,
int
idx
,
int
grow
)
{
double
t
=
dnow
();
int
diffs
=
0
;
int
x
,
y
,
w
,
h
;
int
xp
,
yp
,
wp
,
hp
;
int
xp
=
-
1
,
yp
=
-
1
,
wp
=
-
1
,
hp
=
-
1
;
CGSRect
rect
;
CGSError
err
;
...
...
@@ -217,13 +219,13 @@ static int check_offscreen(int win) {
extern
int
macosx_ncache_macmenu
;
void
macosxCGS_get_all_windows
(
void
)
{
static
double
last
=
0
.
0
;
static
int
totcnt
=
0
;
double
dt
=
0
.
0
,
now
=
dnow
();
int
i
,
db
=
0
,
whist_prv
,
maxwin
=
0
,
whist_skip
=
0
;
int
i
,
db
=
0
,
whist_prv
=
0
,
maxwin
=
0
,
whist_skip
=
0
;
CGSWindowCount
cap
=
(
CGSWindowCount
)
MAXWINDAT
;
CGSWindowCount
cnt
=
0
;
CGSError
err
;
CGS_levelmax
=
0
;
...
...
@@ -267,7 +269,7 @@ void macosxCGS_get_all_windows(void) {
err
=
CGSGetWindowList
(
cid
,
NULL
,
cap
,
_wins_all
,
&
_wins_all_cnt
);
if
(
db
)
fprintf
(
stderr
,
"cnt: %d err: %d
\n
"
,
_wins_all_cnt
,
err
);
if
(
db
)
fprintf
(
stderr
,
"cnt: %d err: %d
\n
"
,
(
int
)
_wins_all_cnt
,
err
);
if
(
err
!=
0
)
{
return
;
...
...
@@ -330,7 +332,7 @@ if (0 || db) fprintf(stderr, "i=%03d ID: %06d x: %03d y: %03d w: %03d h: %03d
err
=
CGSGetOnScreenWindowList
(
cid
,
NULL
,
cap
,
_wins_mapped
,
&
_wins_mapped_cnt
);
if
(
db
)
fprintf
(
stderr
,
"cnt: %d err: %d
\n
"
,
_wins_mapped_cnt
,
err
);
if
(
db
)
fprintf
(
stderr
,
"cnt: %d err: %d
\n
"
,
(
int
)
_wins_mapped_cnt
,
err
);
if
(
err
!=
0
)
{
return
;
...
...
@@ -394,9 +396,9 @@ if (db) fprintf(stderr, "cnt: %d err: %d\n", _wins_mapped_cnt, err);
;
}
else
if
(
!
(
prev
&
is_mapped
)
&&
(
curr
&
is_mapped
))
{
/* MapNotify */
fprintf
(
stderr
,
"MapNotify: %d/%d %d %.4f
%d
tot=%d
\n
"
,
prev
,
curr
,
win
,
dnowx
(),
totcnt
);
fprintf
(
stderr
,
"MapNotify: %d/%d %d %.4f tot=%d
\n
"
,
prev
,
curr
,
win
,
dnowx
(),
totcnt
);
macosx_add_mapnotify
(
win
,
macwins
[
i
].
level
,
1
);
//
macosxCGS_follow_animation_win(win, i, 1);
if
(
0
)
macosxCGS_follow_animation_win
(
win
,
i
,
1
);
}
else
if
(
!
(
curr
&
is_mapped
)
&&
(
prev
&
is_mapped
))
{
/* UnmapNotify */
...
...
@@ -532,6 +534,7 @@ void macosxGCS_poll_pb(void) {
}
dlast
=
now
;
{
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[
pblock
lock
];
if
(
pbcnt
!=
[[
NSPasteboard
generalPasteboard
]
changeCount
])
{
...
...
@@ -550,6 +553,7 @@ void macosxGCS_poll_pb(void) {
}
[
pblock
unlock
];
[
pool
release
];
}
}
#endif
...
...
This diff is collapsed.
Click to expand it.
x11vnc/macosxCGS.h
View file @
f9baaf1e
...
...
@@ -7,6 +7,7 @@ extern void macosxCGS_get_all_windows(void);
extern
int
macosxCGS_get_qlook
(
int
);
extern
void
macosxGCS_set_pasteboard
(
char
*
str
,
int
len
);
extern
int
macosxCGS_follow_animation_win
(
int
win
,
int
idx
,
int
grow
);
extern
int
macosxCGS_find_index
(
int
w
);
#endif
/* _X11VNC_MACOSXCGS_H */
This diff is collapsed.
Click to expand it.
x11vnc/scan.c
View file @
f9baaf1e
...
...
@@ -547,6 +547,8 @@ static void hint_updates(void) {
int
x
,
y
,
i
,
n
,
ty
,
th
,
tx
,
tw
;
int
hint_count
=
0
,
in_run
=
0
;
hint
.
x
=
hint
.
y
=
hint
.
w
=
hint
.
h
=
0
;
for
(
y
=
0
;
y
<
ntiles_y
;
y
++
)
{
for
(
x
=
0
;
x
<
ntiles_x
;
x
++
)
{
n
=
x
+
y
*
ntiles_x
;
...
...
@@ -3069,7 +3071,6 @@ int scan_for_updates(int count_only) {
/* scan with the initial y to the jitter value from scanlines: */
scan_in_progress
=
1
;
tile_count
=
scan_display
(
scanlines
[
scan_count
],
0
);
//if (tile_count) fprintf(stderr, "XX tile_countA: %d\n", tile_count);
SCAN_FATAL
(
tile_count
);
/*
...
...
@@ -3132,14 +3133,12 @@ int scan_for_updates(int count_only) {
cp
=
(
NSCAN
-
scan_count
)
%
NSCAN
;
tile_count
=
scan_display
(
scanlines
[
cp
],
1
);
//fprintf(stderr, "XX tile_countB: %d\n", tile_count);
SCAN_FATAL
(
tile_count
);
if
(
tile_count
>=
(
1
+
frac2
)
*
tile_count_old
)
{
/* on a roll... do a 3rd scan */
cp
=
(
NSCAN
-
scan_count
+
7
)
%
NSCAN
;
tile_count
=
scan_display
(
scanlines
[
cp
],
1
);
//fprintf(stderr, "XX tile_countC: %d\n", tile_count);
SCAN_FATAL
(
tile_count
);
}
}
...
...
This diff is collapsed.
Click to expand it.
x11vnc/screen.c
View file @
f9baaf1e
...
...
@@ -22,6 +22,7 @@
#include "v4l.h"
#include "linuxfb.h"
#include "macosx.h"
#include "macosxCG.h"
void
set_greyscale_colormap
(
void
);
void
set_hi240_colormap
(
void
);
...
...
This diff is collapsed.
Click to expand it.
x11vnc/sslhelper.c
View file @
f9baaf1e
...
...
@@ -1510,7 +1510,7 @@ void accept_openssl(int mode) {
}
if
(
have_httpd
)
{
int
n
,
is_http
;
int
n
=
0
,
is_http
;
int
hport
=
screen
->
httpPort
;
char
*
iface
=
NULL
;
char
*
buf
,
*
tbuf
;
...
...
This diff is collapsed.
Click to expand it.
x11vnc/uinput.c
View file @
f9baaf1e
...
...
@@ -82,10 +82,10 @@ static char *devs[] = {
*/
int
check_uinput
(
void
)
{
int
i
;
#ifndef UINPUT_OK
return
0
;
#else
int
i
;
if
(
UT
.
release
)
{
int
maj
,
min
;
/* guard against linux 2.4 */
...
...
@@ -455,6 +455,8 @@ static void ptr_move(int dx, int dy) {
ev
.
code
=
SYN_REPORT
;
ev
.
value
=
0
;
write
(
fd
,
&
ev
,
sizeof
(
ev
));
#else
if
(
!
dx
||
!
dy
)
{}
#endif
}
...
...
@@ -485,6 +487,8 @@ static void ptr_abs(int x, int y) {
ev
.
code
=
SYN_REPORT
;
ev
.
value
=
0
;
write
(
fd
,
&
ev
,
sizeof
(
ev
));
#else
if
(
!
x
||
!
y
)
{}
#endif
}
...
...
@@ -668,7 +672,8 @@ static void button_click(int down, int btn) {
write
(
fd
,
&
ev
,
sizeof
(
ev
));
last_button_click
=
dnow
();
#else
if
(
!
down
||
!
btn
)
{}
#endif
}
...
...
@@ -910,6 +915,8 @@ void uinput_key_command(int down, int keysym, rfbClientPtr client) {
if
(
0
<=
scancode
&&
scancode
<
256
)
{
key_pressed
[
scancode
]
=
down
?
1
:
0
;
}
#else
if
(
!
down
||
!
keysym
||
!
client
)
{}
#endif
}
...
...
This diff is collapsed.
Click to expand it.
x11vnc/userinput.c
View file @
f9baaf1e
...
...
@@ -1696,7 +1696,6 @@ if (db) fprintf(stderr, " DFC(%d,%d-%d,%d)", tx1, ty1, tx2, ty2);
if
(
fast_push
)
{
fb_push
();
}
//fb_push();
do_fb_push
++
;
PUSH_TEST
(
0
);
}
...
...
@@ -4079,9 +4078,9 @@ fprintf(stderr, "FAW orig_frame unmapped.\n");
if
(
unmapped
)
{
;
}
else
if
(
orig_frame
&&
macosxCGS_follow_animation_win
(
orig_frame
,
-
1
,
0
))
{
fprintf
(
stderr
,
"FAW orig_frame %d
\n
"
,
orig_frame
);
fprintf
(
stderr
,
"FAW orig_frame %d
\n
"
,
(
int
)
orig_frame
);
}
else
if
(
0
&&
frame
&&
macosxCGS_follow_animation_win
(
frame
,
-
1
,
0
))
{
fprintf
(
stderr
,
"FAW frame %d
\n
"
,
frame
);
fprintf
(
stderr
,
"FAW frame %d
\n
"
,
(
int
)
frame
);
}
for
(
j
=
0
;
j
<
m
;
j
++
)
{
macosxCGS_get_all_windows
();
...
...
@@ -6573,7 +6572,7 @@ fprintf(stderr, "backingstore save: 0x%x %3d \n", (unsigned int) win, idx
if
(
!
valid_wr
(
idx
,
win
,
&
attr
))
{
fprintf
(
stderr
,
"bs_save: not a valid X window: 0x%x
\n
"
,
(
unsigned
int
)
win
);
/* XXX Y */
/
/ DELETE(idx);
/
* DELETE(idx); */
X_UNLOCK
;
cache_list
[
idx
].
valid
=
0
;
return
0
;
...
...
@@ -6660,7 +6659,7 @@ fprintf(stderr, "save-unders save: 0x%x %3d \n", (unsigned int) win, idx
if
(
!
valid_wr
(
idx
,
win
,
&
attr
))
{
fprintf
(
stderr
,
"su_save: not a valid X window: 0x%x
\n
"
,
(
unsigned
int
)
win
);
/* XXX Y */
/
/ DELETE(idx);
/
* DELETE(idx); */
X_UNLOCK
;
cache_list
[
idx
].
valid
=
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
x11vnc/v4l.c
View file @
f9baaf1e
...
...
@@ -133,9 +133,9 @@ static int v4l1_height(int h) {
}
static
int
v4l1_resize
(
int
fd
,
int
w
,
int
h
)
{
#ifdef V4L_OK
int
dowin
=
0
;
#ifdef V4L_OK
memset
(
&
v4l1_window
,
0
,
sizeof
(
v4l1_window
));
if
(
ioctl
(
fd
,
VIDIOCGWIN
,
&
v4l1_window
)
==
-
1
)
{
return
0
;
...
...
@@ -167,6 +167,8 @@ static int v4l1_resize(int fd, int w, int h) {
return
0
;
}
}
#else
if
(
!
fd
||
!
w
||
!
h
)
{}
#endif
return
1
;
}
...
...
@@ -186,6 +188,8 @@ static void v4l1_setfreq(int fd, unsigned long freq, int verb) {
last_freq
=
freq
;
}
}
#else
if
(
!
fd
||
!
freq
||
!
verb
)
{}
#endif
}
...
...
@@ -202,6 +206,8 @@ static void v4l1_set_input(int fd, int which) {
ioctl
(
fd
,
VIDIOCSCHAN
,
&
v4l1_channel
);
}
}
#else
if
(
!
fd
||
!
which
)
{}
#endif
}
...
...
@@ -224,6 +230,8 @@ static int v4l1_setfmt(int fd, char *fmt) {
free
(
raw_fb_pixfmt
);
}
raw_fb_pixfmt
=
strdup
(
fmt
);
#else
if
(
!
fd
||
!
fmt
)
{}
#endif
return
1
;
}
...
...
@@ -231,12 +239,12 @@ static int v4l1_setfmt(int fd, char *fmt) {
static
int
ignore_all
=
0
;
static
void
apply_settings
(
char
*
dev
,
char
*
settings
,
int
*
fd
)
{
#ifdef V4L_OK
char
*
str
,
*
p
,
*
fmt
=
NULL
,
*
tun
=
NULL
,
*
inp
=
NULL
;
int
br
=
-
1
,
co
=
-
1
,
cn
=
-
1
,
hu
=
-
1
;
int
w
=
-
1
,
h
=
-
1
,
b
=
-
1
;
int
sta
=
-
1
;
int
setcnt
=
0
;
#ifdef V4L_OK
if
(
!
settings
||
settings
[
0
]
==
'\0'
)
{
return
;
}
...
...
@@ -380,6 +388,7 @@ static void apply_settings(char *dev, char *settings, int *fd) {
v4l1_cap
=
v4l1_query
(
*
fd
,
1
);
v4l2_cap
=
v4l2_query
(
*
fd
,
1
);
#else
if
(
!
dev
||
!
settings
||
!
fd
)
{}
return
;
#endif
}
...
...
@@ -421,6 +430,8 @@ static void v4l_br(int b) {
v4l1_picture
.
brightness
=
v4l1_dpct
(
old
,
b
);
ioctl
(
raw_fb_fd
,
VIDIOCSPICT
,
&
v4l1_picture
);
v4l_requery
();
#else
if
(
!
b
)
{}
#endif
}
...
...
@@ -431,6 +442,8 @@ static void v4l_hu(int b) {
v4l1_picture
.
hue
=
v4l1_dpct
(
old
,
b
);
ioctl
(
raw_fb_fd
,
VIDIOCSPICT
,
&
v4l1_picture
);
v4l_requery
();
#else
if
(
!
b
)
{}
#endif
}
...
...
@@ -441,6 +454,8 @@ static void v4l_co(int b) {
v4l1_picture
.
colour
=
v4l1_dpct
(
old
,
b
);
ioctl
(
raw_fb_fd
,
VIDIOCSPICT
,
&
v4l1_picture
);
v4l_requery
();
#else
if
(
!
b
)
{}
#endif
}
...
...
@@ -451,6 +466,8 @@ static void v4l_cn(int b) {
v4l1_picture
.
contrast
=
v4l1_dpct
(
old
,
b
);
ioctl
(
raw_fb_fd
,
VIDIOCSPICT
,
&
v4l1_picture
);
v4l_requery
();
#else
if
(
!
b
)
{}
#endif
}
...
...
@@ -488,6 +505,8 @@ static void v4l_sz(int b) {
ignore_all
=
1
;
do_new_fb
(
1
);
ignore_all
=
0
;
#else
if
(
!
b
)
{}
#endif
}
...
...
@@ -522,6 +541,8 @@ static void v4l_sta(int sta) {
}
fprintf
(
stderr
,
"to station %d / %d
\n
"
,
cur
,
(
int
)
freq
);
v4l1_setfreq
(
raw_fb_fd
,
freq
,
0
);
#else
if
(
!
sta
)
{}
#endif
}
...
...
@@ -544,6 +565,8 @@ static void v4l_inp(int inp) {
next
=
inp
;
}
v4l1_set_input
(
raw_fb_fd
,
next
);
#else
if
(
!
inp
)
{}
#endif
}
...
...
@@ -732,6 +755,8 @@ static unsigned short v4l1_lu_palette_str(char *name, int *bits, int *rev) {
*
bits
=
8
;
return
VIDEO_PALETTE_GREY
;
}
#else
if
(
!
name
||
!
bits
||
!
rev
)
{}
#endif
return
0
;
}
...
...
@@ -814,6 +839,8 @@ static unsigned int v4l2_lu_palette_str(char *name, int *bits, int *rev) {
*
rev
=
0
;
return
V4L2_PIX_FMT_GREY
;
}
#else
if
(
!
name
||
!
bits
||
!
rev
)
{}
#endif
return
0
;
}
...
...
@@ -912,6 +939,7 @@ static int v4l1_query(int fd, int v) {
return
1
;
#else
if
(
!
fd
||
!
v
)
{}
return
0
;
#endif
/* V4L_OK */
...
...
@@ -992,6 +1020,7 @@ static int v4l2_query(int fd, int v) {
return
1
;
#else
if
(
!
fd
||
!
v
)
{}
return
0
;
#endif
/* V4L_OK && HAVE_V4L2 */
...
...
@@ -1089,6 +1118,7 @@ if (0) fprintf(stderr, "v4l1: %d %d %d\n", g_w, g_h, g_d);
close
(
dfd
);
return
NULL
;
#else
if
(
!
dev
||
!
fd
)
{}
return
NULL
;
#endif
}
...
...
This diff is collapsed.
Click to expand it.
x11vnc/win_utils.c
View file @
f9baaf1e
...
...
@@ -6,6 +6,7 @@
#include "cleanup.h"
#include "xwrappers.h"
#include "connections.h"
#include "macosx.h"
winattr_t
*
stack_list
=
NULL
;
int
stack_list_len
=
0
;
...
...
This diff is collapsed.
Click to expand it.
x11vnc/xevents.c
View file @
f9baaf1e
...
...
@@ -1145,7 +1145,8 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) {
#ifdef MACOSX
if
(
macosx_console
)
{
return
macosx_set_sel
(
text
,
len
);
macosx_set_sel
(
text
,
len
);
return
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
x11vnc/xwrappers.c
View file @
f9baaf1e
...
...
@@ -6,6 +6,7 @@
#include "xevents.h"
#include "connections.h"
#include "cleanup.h"
#include "macosx.h"
int
xshm_present
=
0
;
int
xtest_present
=
0
;
...
...
This diff is collapsed.
Click to expand it.
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