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
80ca7cf1
Commit
80ca7cf1
authored
Jan 20, 2005
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no need to strdup for MakeXCursor
parent
cafeb40f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
cursortest.c
test/cursortest.c
+10
-5
No files found.
test/cursortest.c
View file @
80ca7cf1
...
@@ -72,7 +72,7 @@ void SetXCursor(rfbScreenInfoPtr rfbScreen)
...
@@ -72,7 +72,7 @@ void SetXCursor(rfbScreenInfoPtr rfbScreen)
"xxxx xxxx"
;
"xxxx xxxx"
;
rfbCursorPtr
c
;
rfbCursorPtr
c
;
c
=
rfbMakeXCursor
(
width
,
height
,
strdup
(
cursor
),
strdup
(
mask
)
);
c
=
rfbMakeXCursor
(
width
,
height
,
cursor
,
mask
);
c
->
xhot
=
width
/
2
;
c
->
yhot
=
height
/
2
;
c
->
xhot
=
width
/
2
;
c
->
yhot
=
height
/
2
;
rfbSetCursor
(
rfbScreen
,
c
);
rfbSetCursor
(
rfbScreen
,
c
);
...
@@ -128,7 +128,7 @@ void SetXCursor2(rfbScreenInfoPtr rfbScreen)
...
@@ -128,7 +128,7 @@ void SetXCursor2(rfbScreenInfoPtr rfbScreen)
" "
;
" "
;
rfbCursorPtr
c
;
rfbCursorPtr
c
;
c
=
rfbMakeXCursor
(
width
,
height
,
strdup
(
cursor
),
strdup
(
mask
)
);
c
=
rfbMakeXCursor
(
width
,
height
,
cursor
,
mask
);
c
->
xhot
=
0
;
c
->
yhot
=
0
;
c
->
xhot
=
0
;
c
->
yhot
=
0
;
rfbSetCursor
(
rfbScreen
,
c
);
rfbSetCursor
(
rfbScreen
,
c
);
...
@@ -176,7 +176,7 @@ void SetRichCursor(rfbScreenInfoPtr rfbScreen)
...
@@ -176,7 +176,7 @@ void SetRichCursor(rfbScreenInfoPtr rfbScreen)
" xxxxxxxxxxxxxxxx "
" xxxxxxxxxxxxxxxx "
" "
;
" "
;
c
=
rfbMakeXCursor
(
w
,
h
,
strdup
(
bitmap
),
strdup
(
bitmap
)
);
c
=
rfbMakeXCursor
(
w
,
h
,
bitmap
,
bitmap
);
c
->
xhot
=
16
;
c
->
yhot
=
24
;
c
->
xhot
=
16
;
c
->
yhot
=
24
;
c
->
richSource
=
(
char
*
)
malloc
(
w
*
h
*
bpp
);
c
->
richSource
=
(
char
*
)
malloc
(
w
*
h
*
bpp
);
...
@@ -215,7 +215,7 @@ void SetRichCursor2(rfbScreenInfoPtr rfbScreen)
...
@@ -215,7 +215,7 @@ void SetRichCursor2(rfbScreenInfoPtr rfbScreen)
"xxxxxxxxxxxxx x"
"xxxxxxxxxxxxx x"
"xxxxxxxxxxxxx x"
;
"xxxxxxxxxxxxx x"
;
/* c=rfbScreen->cursor = rfbMakeXCursor(w,h,bitmap,bitmap); */
/* c=rfbScreen->cursor = rfbMakeXCursor(w,h,bitmap,bitmap); */
c
=
rfbMakeXCursor
(
w
,
h
,
strdup
(
bitmap
),
strdup
(
bitmap
)
);
c
=
rfbMakeXCursor
(
w
,
h
,
bitmap
,
bitmap
);
c
->
xhot
=
5
;
c
->
yhot
=
7
;
c
->
xhot
=
5
;
c
->
yhot
=
7
;
c
->
richSource
=
(
char
*
)
malloc
(
w
*
h
*
bpp
);
c
->
richSource
=
(
char
*
)
malloc
(
w
*
h
*
bpp
);
...
@@ -299,6 +299,11 @@ void doptr(int buttonMask,int x,int y,rfbClientPtr cl)
...
@@ -299,6 +299,11 @@ void doptr(int buttonMask,int x,int y,rfbClientPtr cl)
counter
=
0
;
counter
=
0
;
}
}
}
}
if
(
buttonMask
&
2
)
{
rfbScreenCleanup
(
cl
->
screen
);
exit
(
0
);
}
if
(
buttonMask
&
4
)
if
(
buttonMask
&
4
)
rfbCloseClient
(
cl
);
rfbCloseClient
(
cl
);
...
@@ -327,7 +332,7 @@ int main(int argc,char** argv)
...
@@ -327,7 +332,7 @@ int main(int argc,char** argv)
rfbInitServer
(
rfbScreen
);
rfbInitServer
(
rfbScreen
);
rfbLog
(
"Change cursor shape with left mouse button,
\n\t
"
rfbLog
(
"Change cursor shape with left mouse button,
\n\t
"
"quit with right one.
\n
"
);
"quit with right one
(middle button quits server)
.
\n
"
);
/* this is the blocking event loop, i.e. it never returns */
/* this is the blocking event loop, i.e. it never returns */
/* 40000 are the microseconds to wait on select(), i.e. 0.04 seconds */
/* 40000 are the microseconds to wait on select(), i.e. 0.04 seconds */
...
...
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