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
99a557d6
Commit
99a557d6
authored
Dec 28, 2006
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: clean up compiler warnings.
parent
56eb45a5
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
120 additions
and
84 deletions
+120
-84
8to24.c
x11vnc/8to24.c
+1
-0
README
x11vnc/README
+1
-1
connections.c
x11vnc/connections.c
+1
-0
cursor.c
x11vnc/cursor.c
+3
-1
gui.c
x11vnc/gui.c
+4
-0
keyboard.c
x11vnc/keyboard.c
+1
-0
macosx.c
x11vnc/macosx.c
+13
-0
macosxCG.c
x11vnc/macosxCG.c
+2
-0
pointer.c
x11vnc/pointer.c
+1
-0
scan.c
x11vnc/scan.c
+16
-6
screen.c
x11vnc/screen.c
+0
-1
solid.c
x11vnc/solid.c
+1
-0
user.c
x11vnc/user.c
+1
-1
userinput.c
x11vnc/userinput.c
+63
-73
userinput.h
x11vnc/userinput.h
+3
-0
win_utils.c
x11vnc/win_utils.c
+1
-1
xwrappers.c
x11vnc/xwrappers.c
+4
-0
xwrappers.h
x11vnc/xwrappers.h
+4
-0
No files found.
x11vnc/8to24.c
View file @
99a557d6
...
...
@@ -4,6 +4,7 @@
#include "scan.h"
#include "util.h"
#include "win_utils.h"
#include "xwrappers.h"
int
multivis_count
=
0
;
int
multivis_24count
=
0
;
...
...
x11vnc/README
View file @
99a557d6
x11vnc
README
file
Date
:
Thu
Dec
28
00
:
14
:
27
EST
2006
x11vnc
README
file
Date
:
Thu
Dec
28
10
:
42
:
34
EST
2006
The
following
information
is
taken
from
these
URLs
:
...
...
x11vnc/connections.c
View file @
99a557d6
...
...
@@ -17,6 +17,7 @@
#include "xwrappers.h"
#include "xevents.h"
#include "macosxCG.h"
#include "userinput.h"
/*
* routines for handling incoming, outgoing, etc connections
...
...
x11vnc/cursor.c
View file @
99a557d6
...
...
@@ -1227,6 +1227,8 @@ unsigned long get_cursor_serial(int mode) {
return
last_cursor
;
}
else
if
(
mode
==
1
)
{
return
(
unsigned
long
)
last_index
;
}
else
{
return
(
unsigned
long
)
last_index
;
}
}
...
...
@@ -1320,7 +1322,7 @@ fprintf(stderr, "sc: %d %d/%d %d - %d %d\n", serial, w, h, cbpp, xhot, yhot);
oldest
=
i
;
oldtime
=
curs_times
[
i
];
}
if
(
serial
==
curs_index
[
i
])
{
if
(
serial
==
(
int
)
curs_index
[
i
])
{
/*
* got a hit with an existing cursor,
* use that one.
...
...
x11vnc/gui.c
View file @
99a557d6
...
...
@@ -267,7 +267,9 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
initialize_x11vnc_remote_prop
();
}
#ifdef MACOSX
macjump:
#endif
signal
(
SIGUSR1
,
sigusr1
);
got_sigusr1
=
0
;
...
...
@@ -630,7 +632,9 @@ void do_gui(char *opts, int sleep) {
}
XCloseDisplay_wr
(
test_dpy
);
#ifdef MACOSX
startit:
#endif
if
(
start_x11vnc
)
{
...
...
x11vnc/keyboard.c
View file @
99a557d6
...
...
@@ -14,6 +14,7 @@
#include "v4l.h"
#include "linuxfb.h"
#include "uinput.h"
#include "macosx.h"
void
get_keystate
(
int
*
keystate
);
void
clear_modifiers
(
int
init
);
...
...
x11vnc/macosx.c
View file @
99a557d6
...
...
@@ -48,12 +48,15 @@ void macosx_event_loop(void) {
return
;
}
char
*
macosx_console_guess
(
char
*
str
,
int
*
fd
)
{
if
(
!
str
||
!
fd
)
{}
return
NULL
;
}
void
macosx_key_command
(
rfbBool
down
,
rfbKeySym
keysym
,
rfbClientPtr
client
)
{
if
(
!
down
||
!
keysym
||
!
client
)
{}
return
;
}
void
macosx_pointer_command
(
int
mask
,
int
x
,
int
y
,
rfbClientPtr
client
)
{
if
(
!
mask
||
!
x
||
!
y
||
!
client
)
{}
return
;
}
char
*
macosx_get_fb_addr
(
void
)
{
...
...
@@ -63,35 +66,45 @@ int macosx_get_cursor(void) {
return
0
;
}
int
macosx_get_cursor_pos
(
int
*
x
,
int
*
y
)
{
if
(
!
x
||
!
y
)
{}
return
0
;
}
void
macosx_send_sel
(
char
*
str
,
int
len
)
{
if
(
!
str
||
!
len
)
{}
return
;
}
void
macosx_set_sel
(
char
*
str
,
int
len
)
{
if
(
!
str
||
!
len
)
{}
return
;
}
int
macosx_valid_window
(
Window
w
,
XWindowAttributes
*
a
)
{
if
(
!
w
||
!
a
)
{}
return
0
;
}
Status
macosx_xquerytree
(
Window
w
,
Window
*
root_return
,
Window
*
parent_return
,
Window
**
children_return
,
unsigned
int
*
nchildren_return
)
{
if
(
!
w
||
!
root_return
||
!
parent_return
||
!
children_return
||
!
nchildren_return
)
{}
return
(
Status
)
0
;
}
void
macosx_add_mapnotify
(
Window
win
,
int
level
,
int
map
)
{
if
(
!
win
||
!
level
||
!
map
)
{}
return
;
}
void
macosx_add_create
(
Window
win
,
int
level
)
{
if
(
!
win
||
!
level
)
{}
return
;
}
void
macosx_add_destroy
(
Window
win
,
int
level
)
{
if
(
!
win
||
!
level
)
{}
return
;
}
void
macosx_add_visnotify
(
Window
win
,
int
level
,
int
obscured
)
{
if
(
!
win
||
!
level
||
!
obscured
)
{}
return
;
}
int
macosx_checkevent
(
XEvent
*
ev
)
{
if
(
!
ev
)
{}
return
0
;
}
...
...
x11vnc/macosxCG.c
View file @
99a557d6
...
...
@@ -6,6 +6,8 @@
* will not work!!
*/
void
macosxCG_dummy
(
void
)
{}
#if (defined(__MACH__) && defined(__APPLE__))
#include <ApplicationServices/ApplicationServices.h>
...
...
x11vnc/pointer.c
View file @
99a557d6
...
...
@@ -15,6 +15,7 @@
#include "linuxfb.h"
#include "uinput.h"
#include "scan.h"
#include "macosx.h"
int
pointer_queued_sent
=
0
;
...
...
x11vnc/scan.c
View file @
99a557d6
...
...
@@ -13,6 +13,7 @@
#include "unixpw.h"
#include "screen.h"
#include "macosx.h"
#include "userinput.h"
/*
* routines for scanning and reading the X11 display for changes, and
...
...
@@ -2351,7 +2352,6 @@ static void blackout_regions(void) {
* are other issues... use -fs 1.0 to disable.
*/
int
copy_screen
(
void
)
{
int
pixelsize
=
bpp
/
8
;
char
*
fbp
;
int
i
,
y
,
block_size
;
...
...
@@ -2462,7 +2462,7 @@ static void snap_all_rawfb(void) {
}
int
copy_snap
(
void
)
{
int
db
=
1
,
pixelsize
=
bpp
/
8
;
int
db
=
1
;
char
*
fbp
;
int
i
,
y
,
block_size
;
double
dt
;
...
...
@@ -2872,7 +2872,9 @@ if (ncache > 0) {
}
}
else
{
#if !NO_X11
if
(
XCheckTypedEvent
(
dpy
,
MapNotify
,
&
ev
))
{
if
(
raw_fb_str
)
{
;
}
else
if
(
XCheckTypedEvent
(
dpy
,
MapNotify
,
&
ev
))
{
gotone
=
1
;
}
else
if
(
XCheckTypedEvent
(
dpy
,
UnmapNotify
,
&
ev
))
{
gotone
=
2
;
...
...
@@ -2995,7 +2997,7 @@ int scan_for_updates(int count_only) {
double
frac2
=
0
.
35
;
/* or 3rd */
double
frac3
=
0
.
02
;
/* do scan_display() again after copy_tiles() */
static
double
last_poll
=
0
.
0
;
double
dtmp
;
double
dtmp
=
0
.
0
;
if
(
unixpw_in_progress
)
return
0
;
...
...
@@ -3190,9 +3192,14 @@ int scan_for_updates(int count_only) {
}
if
(
unixpw_in_progress
)
return
0
;
/* XXX Y */
if
(
0
&&
tile_count
>
20
)
print_tiles
();
//dtmp = dnow();
#if 0
dtmp = dnow();
#else
dtmp
=
0
.
0
;
#endif
if
(
old_copy_tile
)
{
tile_diffs
=
copy_all_tiles
();
...
...
@@ -3200,7 +3207,10 @@ if (0 && tile_count > 20) print_tiles();
tile_diffs
=
copy_all_tile_runs
();
}
SCAN_FATAL
(
tile_diffs
);
//if (tile_count) fprintf(stderr, "XX copytile: %.4f tile_count: %d\n", dnow() - dtmp, tile_count);
#if 0
if (tile_count) fprintf(stderr, "XX copytile: %.4f tile_count: %d\n", dnow() - dtmp, tile_count);
#endif
/*
* This backward pass for upward and left tiles complements what
...
...
x11vnc/screen.c
View file @
99a557d6
...
...
@@ -701,7 +701,6 @@ void free_old_fb(void) {
void
do_new_fb
(
int
reset_mem
)
{
XImage
*
fb
;
int
i
;
/* for threaded we really should lock libvncserver out. */
if
(
use_threads
)
{
...
...
x11vnc/solid.c
View file @
99a557d6
...
...
@@ -4,6 +4,7 @@
#include "win_utils.h"
#include "xwrappers.h"
#include "connections.h"
#include "cleanup.h"
char
*
guess_desktop
(
void
);
void
solid_bg
(
int
restore
);
...
...
x11vnc/user.c
View file @
99a557d6
...
...
@@ -980,7 +980,7 @@ void check_new_passwds(int force) {
}
rfbBool
custom_passwd_check
(
rfbClientPtr
cl
,
const
char
*
response
,
int
len
)
{
char
*
input
,
*
q
,
*
cmd
;
char
*
input
,
*
cmd
;
char
num
[
16
];
int
j
,
i
,
n
,
rc
;
...
...
x11vnc/userinput.c
View file @
99a557d6
This diff is collapsed.
Click to expand it.
x11vnc/userinput.h
View file @
99a557d6
...
...
@@ -37,4 +37,7 @@ extern int fb_update_sent(int *count);
extern
int
check_user_input
(
double
dt
,
double
dtr
,
int
tile_diffs
,
int
*
cnt
);
extern
void
do_copyregion
(
sraRegionPtr
region
,
int
dx
,
int
dy
,
int
mode
);
extern
int
check_ncache
(
int
reset
,
int
mode
);
extern
int
find_rect
(
int
idx
,
int
x
,
int
y
,
int
w
,
int
h
);
#endif
/* _X11VNC_USERINPUT_H */
x11vnc/win_utils.c
View file @
99a557d6
...
...
@@ -290,7 +290,7 @@ void update_stack_list(void) {
X_LOCK
;
for
(
k
=
0
;
k
<
stack_list_num
;
k
++
)
{
Window
win
=
stack_list
[
k
].
win
;
if
(
win
!=
None
&&
boff
<=
win
&&
win
<
boff
+
bwin
)
{
if
(
win
!=
None
&&
boff
<=
(
int
)
win
&&
(
int
)
win
<
boff
+
bwin
)
{
;
/* special, blackout */
}
else
if
(
!
valid_window
(
win
,
&
attr
,
1
))
{
stack_list
[
k
].
valid
=
0
;
...
...
x11vnc/xwrappers.c
View file @
99a557d6
...
...
@@ -79,6 +79,10 @@ Bool XQueryPointer_wr(Display *display, Window w, Window *root_return,
Window
*
child_return
,
int
*
root_x_return
,
int
*
root_y_return
,
int
*
win_x_return
,
int
*
win_y_return
,
unsigned
int
*
mask_return
);
Status
XQueryTree_wr
(
Display
*
display
,
Window
w
,
Window
*
root_return
,
Window
*
parent_return
,
Window
**
children_return
,
unsigned
int
*
nchildren_return
);
int
XFree_wr
(
void
*
data
);
int
XSelectInput_wr
(
Display
*
display
,
Window
w
,
long
event_mask
);
...
...
x11vnc/xwrappers.h
View file @
99a557d6
...
...
@@ -76,6 +76,10 @@ extern Bool XQueryPointer_wr(Display *display, Window w, Window *root_return,
Window
*
child_return
,
int
*
root_x_return
,
int
*
root_y_return
,
int
*
win_x_return
,
int
*
win_y_return
,
unsigned
int
*
mask_return
);
extern
Status
XQueryTree_wr
(
Display
*
display
,
Window
w
,
Window
*
root_return
,
Window
*
parent_return
,
Window
**
children_return
,
unsigned
int
*
nchildren_return
);
extern
int
XFree_wr
(
void
*
data
);
extern
int
XSelectInput_wr
(
Display
*
display
,
Window
w
,
long
event_mask
);
...
...
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