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
f6e8bc89
Commit
f6e8bc89
authored
Oct 02, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented rfbSetCursor
parent
090c4738
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
17 deletions
+30
-17
CHANGES
CHANGES
+1
-0
cursor.c
cursor.c
+26
-0
rfb.h
rfb.h
+3
-17
No files found.
CHANGES
View file @
f6e8bc89
...
...
@@ -6,6 +6,7 @@
pthreads now work
cleaned up mac.c (from original OSXvnc); now compiles (untested!)
compiles cleanly on Linux, IRIX, BSD, Apple
fixed prototypes
0.1
rewrote API to use pseudo-methods instead of required functions.
lots of clean up.
...
...
cursor.c
View file @
f6e8bc89
...
...
@@ -472,3 +472,29 @@ void rfbPrintXCursor(rfbCursorPtr cursor)
putchar
(
'\n'
);
}
}
extern
void
rfbSetCursor
(
rfbScreenInfoPtr
rfbScreen
,
rfbCursorPtr
c
,
Bool
freeOld
)
{
rfbClientPtr
cl
;
#ifdef HAVE_PTHREADS
pthread_mutex_lock
(
rfbScreen
->
cursor
->
mutex
);
#endif
for
(
cl
=
rfbScreen
->
rfbClientHead
;
cl
;
cl
=
cl
->
next
)
if
(
cl
->
sock
>=
0
)
{
#ifdef HAVE_PTHREADS
pthread_mutex_lock
(
cl
->
updateMutex
);
#endif
rfbUndrawCursor
(
cl
);
#ifdef HAVE_PTHREADS
pthread_mutex_unlock
(
cl
->
updateMutex
);
#endif
}
#ifdef HAVE_PTHREADS
pthread_mutex_unlock
(
rfbScreen
->
cursor
->
mutex
);
#endif
if
(
freeOld
&&
rfbScreen
->
cursor
)
rfbFreeCursor
(
rfbScreen
->
cursor
);
rfbScreen
->
cursor
=
c
;
}
rfb.h
View file @
f6e8bc89
...
...
@@ -143,14 +143,14 @@ typedef struct
routines can invoke the cursor routines, but also the cursor routines
themselves end up invoking drawing routines.
Removing the cursor (rfb
SpriteRemove
Cursor) is eventually achieved by
Removing the cursor (rfb
Undraw
Cursor) is eventually achieved by
doing a CopyArea from a pixmap to the screen, where the pixmap contains
the saved contents of the screen under the cursor. Before doing this,
however, we set cursorIsDrawn to FALSE. Then, when CopyArea is called,
it sees that cursorIsDrawn is FALSE and so doesn't feel the need to
(recursively!) remove the cursor before doing it.
Putting up the cursor (rfb
SpriteRestore
Cursor) involves a call to
Putting up the cursor (rfb
Draw
Cursor) involves a call to
PushPixels. While this is happening, cursorIsDrawn must be FALSE so
that PushPixels doesn't think it has to remove the cursor first.
Obviously cursorIsDrawn is set to TRUE afterwards.
...
...
@@ -175,23 +175,8 @@ typedef struct
int
cursorX
,
cursorY
,
underCursorBufferLen
;
char
*
underCursorBuffer
;
/* wrapped screen functions */
/*
CloseScreenProcPtr CloseScreen;
CreateGCProcPtr CreateGC;
PaintWindowBackgroundProcPtr PaintWindowBackground;
PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
RestoreAreasProcPtr RestoreAreas;
*/
/* additions by libvncserver */
/*
ScreenRec screen;
*/
rfbPixelFormat
rfbServerFormat
;
rfbColourMap
colourMap
;
/* set this if rfbServerFormat.trueColour==FALSE */
char
*
desktopName
;
...
...
@@ -628,6 +613,7 @@ extern void MakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cu
extern
void
rfbFreeCursor
(
rfbCursorPtr
cursor
);
extern
void
rfbDrawCursor
(
rfbClientPtr
cl
);
extern
void
rfbUndrawCursor
(
rfbClientPtr
cl
);
extern
void
rfbSetCursor
(
rfbScreenInfoPtr
rfbScreen
,
rfbCursorPtr
c
,
Bool
freeOld
);
/* cursor handling for the pointer */
extern
void
defaultPtrAddEvent
(
int
buttonMask
,
int
x
,
int
y
,
rfbClientPtr
cl
);
...
...
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