From 018e90db5918a75ceaf3835be084e2387f31a47e Mon Sep 17 00:00:00 2001 From: dscho Date: Fri, 5 Oct 2001 21:41:16 +0000 Subject: changed cursor functions to use screen info, not cursor fixed copy rect. --- cursor.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'cursor.c') diff --git a/cursor.c b/cursor.c index 6e678d5..f04dc84 100644 --- a/cursor.c +++ b/cursor.c @@ -331,9 +331,8 @@ void MakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor) /* functions to draw/hide cursor directly in the frame buffer */ -void rfbUndrawCursor(rfbClientPtr cl) +void rfbUndrawCursor(rfbScreenInfoPtr s) { - rfbScreenInfoPtr s=cl->screen; rfbCursorPtr c=s->cursor; int j,x1,x2,y1,y2,bpp=s->rfbServerFormat.bitsPerPixel/8, rowstride=s->paddedWidthInBytes; @@ -372,9 +371,8 @@ void rfbUndrawCursor(rfbClientPtr cl) UNLOCK(s->cursorMutex); } -void rfbDrawCursor(rfbClientPtr cl) +void rfbDrawCursor(rfbScreenInfoPtr s) { - rfbScreenInfoPtr s=cl->screen; rfbCursorPtr c=s->cursor; int i,j,x1,x2,y1,y2,i1,j1,bpp=s->rfbServerFormat.bitsPerPixel/8, rowstride=s->paddedWidthInBytes, @@ -453,16 +451,8 @@ void rfbPrintXCursor(rfbCursorPtr cursor) extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c,Bool freeOld) { - rfbClientIteratorPtr i = rfbGetClientIterator(rfbScreen); - rfbClientPtr cl; - LOCK(rfbScreen->cursorMutex); - - while((cl=rfbClientIteratorNext(i))) { - LOCK(cl->updateMutex); - rfbUndrawCursor(cl); - UNLOCK(cl->updateMutex); - } + rfbUndrawCursor(rfbScreen); if(freeOld && rfbScreen->cursor) rfbFreeCursor(rfbScreen->cursor); -- cgit v1.2.3