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
6cfd9afe
Commit
6cfd9afe
authored
Sep 11, 2006
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make cut text handling using a hook
parent
e4c85d48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
rfbproto.c
libvncclient/rfbproto.c
+9
-11
rfbclient.h
rfb/rfbclient.h
+2
-2
No files found.
libvncclient/rfbproto.c
View file @
6cfd9afe
...
...
@@ -1019,10 +1019,6 @@ SendClientCutText(rfbClient* client, char *str, int len)
{
rfbClientCutTextMsg
cct
;
if
(
client
->
serverCutText
)
free
(
client
->
serverCutText
);
client
->
serverCutText
=
NULL
;
if
(
!
SupportsClient2Server
(
client
,
rfbClientCutText
))
return
TRUE
;
cct
.
type
=
rfbClientCutText
;
...
...
@@ -1481,23 +1477,25 @@ HandleRFBServerMessage(rfbClient* client)
case
rfbServerCutText
:
{
char
*
buffer
;
if
(
!
ReadFromRFBServer
(
client
,
((
char
*
)
&
msg
)
+
1
,
sz_rfbServerCutTextMsg
-
1
))
return
FALSE
;
msg
.
sct
.
length
=
rfbClientSwap32IfLE
(
msg
.
sct
.
length
);
if
(
client
->
serverCutText
)
free
(
client
->
serverCutText
);
buffer
=
malloc
(
msg
.
sct
.
length
+
1
);
client
->
serverCutText
=
malloc
(
msg
.
sct
.
length
+
1
);
if
(
!
ReadFromRFBServer
(
client
,
client
->
serverCutText
,
msg
.
sct
.
length
))
if
(
!
ReadFromRFBServer
(
client
,
buffer
,
msg
.
sct
.
length
))
return
FALSE
;
client
->
serverCutText
[
msg
.
sct
.
length
]
=
0
;
buffer
[
msg
.
sct
.
length
]
=
0
;
if
(
client
->
GotXCutText
)
client
->
GotXCutText
(
client
,
buffer
,
msg
.
sct
.
length
);
client
->
newServerCutText
=
TRUE
;
free
(
buffer
)
;
break
;
}
...
...
rfb/rfbclient.h
View file @
6cfd9afe
...
...
@@ -104,6 +104,7 @@ typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
typedef
void
(
*
GotFrameBufferUpdateProc
)(
struct
_rfbClient
*
client
,
int
x
,
int
y
,
int
w
,
int
h
);
typedef
char
*
(
*
GetPasswordProc
)(
struct
_rfbClient
*
client
);
typedef
rfbBool
(
*
MallocFrameBufferProc
)(
struct
_rfbClient
*
client
);
typedef
void
(
*
GotXCutTextProc
)(
struct
_rfbClient
*
client
,
const
char
*
text
,
int
textlen
);
typedef
void
(
*
BellProc
)(
struct
_rfbClient
*
client
);
typedef
struct
_rfbClient
{
...
...
@@ -136,8 +137,6 @@ typedef struct _rfbClient {
char
*
desktopName
;
rfbPixelFormat
format
;
rfbServerInitMsg
si
;
char
*
serverCutText
;
rfbBool
newServerCutText
;
/* sockets.c */
#define RFB_BUF_SIZE 8192
...
...
@@ -220,6 +219,7 @@ typedef struct _rfbClient {
/* the pointer returned by GetPassword will be freed after use! */
GetPasswordProc
GetPassword
;
MallocFrameBufferProc
MallocFrameBuffer
;
GotXCutTextProc
GotXCutText
;
BellProc
Bell
;
/* Which messages are supported by the server
...
...
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