diff options
author | dscho <dscho> | 2005-01-20 14:04:10 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-01-20 14:04:10 +0000 |
commit | 155f4c1053739e248a82b91e4c989b94727c3ea6 (patch) | |
tree | d743402edc128890bd7b497cb38f3955249686bd /libvncserver | |
parent | 47646a200feefc37754c385389f7d7b6119c7f07 (diff) | |
download | libtdevnc-155f4c1053739e248a82b91e4c989b94727c3ea6.tar.gz libtdevnc-155f4c1053739e248a82b91e4c989b94727c3ea6.zip |
fix disappearing cursor
Diffstat (limited to 'libvncserver')
-rw-r--r-- | libvncserver/cursor.c | 11 | ||||
-rw-r--r-- | libvncserver/main.c | 3 | ||||
-rw-r--r-- | libvncserver/rfbserver.c | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/libvncserver/cursor.c b/libvncserver/cursor.c index 3a01e64..df6a36d 100644 --- a/libvncserver/cursor.c +++ b/libvncserver/cursor.c @@ -570,7 +570,7 @@ void rfbShowCursor(rfbClientPtr cl) * region gets redrawn. */ -void rfbRedrawAfterHideCursor(rfbClientPtr cl) +void rfbRedrawAfterHideCursor(rfbClientPtr cl,sraRegionPtr updateRegion) { rfbScreenInfoPtr s = cl->screen; rfbCursorPtr c = s->cursor; @@ -587,7 +587,10 @@ void rfbRedrawAfterHideCursor(rfbClientPtr cl) sraRegionPtr rect; fprintf(stderr,"%d %d %d %d\n",x,y,x2,y2); rect = sraRgnCreateRect(x,y,x2,y2); - sraRgnOr(cl->modifiedRegion,rect); + if(updateRegion) + sraRgnOr(updateRegion,rect); + else + sraRgnOr(cl->modifiedRegion,rect); sraRgnDestroy(rect); } } @@ -620,7 +623,7 @@ void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c) iterator=rfbGetClientIterator(rfbScreen); while((cl=rfbClientIteratorNext(iterator))) if(!cl->enableCursorShapeUpdates) - rfbRedrawAfterHideCursor(cl); + rfbRedrawAfterHideCursor(cl,0); rfbReleaseClientIterator(iterator); if(rfbScreen->cursor->cleanup) @@ -633,7 +636,7 @@ void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c) while((cl=rfbClientIteratorNext(iterator))) { cl->cursorWasChanged = TRUE; if(!cl->enableCursorShapeUpdates) - rfbRedrawAfterHideCursor(cl); + rfbRedrawAfterHideCursor(cl,0); } rfbReleaseClientIterator(iterator); diff --git a/libvncserver/main.c b/libvncserver/main.c index 102cebb..0f68ee1 100644 --- a/libvncserver/main.c +++ b/libvncserver/main.c @@ -50,9 +50,6 @@ char rfbEndianTest = -1; void rfbIncrClientRef(rfbClientPtr cl); void rfbDecrClientRef(rfbClientPtr cl); -/* cursor.c */ -void rfbRedrawAfterHideCursor(rfbClientPtr cl); - void rfbLogEnable(int enabled) { rfbEnableLogging=enabled; } diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index f9ab595..79670bb 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -64,7 +64,7 @@ void rfbShowCursor(rfbClientPtr cl); void rfbHideCursor(rfbClientPtr cl); -void rfbRedrawAfterHideCursor(rfbClientPtr cl); +void rfbRedrawAfterHideCursor(rfbClientPtr cl,sraRegionPtr updateRegion); static void rfbProcessClientProtocolVersion(rfbClientPtr cl); static void rfbProcessClientNormalMessage(rfbClientPtr cl); @@ -828,7 +828,7 @@ rfbProcessClientNormalMessage(cl) cl->host); /* if cursor was drawn, hide the cursor */ if(!cl->enableCursorShapeUpdates) - rfbRedrawAfterHideCursor(cl); + rfbRedrawAfterHideCursor(cl,0); cl->enableCursorShapeUpdates = TRUE; cl->cursorWasChanged = TRUE; @@ -839,7 +839,7 @@ rfbProcessClientNormalMessage(cl) cl->host); /* if cursor was drawn, hide the cursor */ if(!cl->enableCursorShapeUpdates) - rfbRedrawAfterHideCursor(cl); + rfbRedrawAfterHideCursor(cl,0); cl->enableCursorShapeUpdates = TRUE; cl->useRichCursorEncoding = TRUE; @@ -1217,12 +1217,12 @@ rfbSendFramebufferUpdate(cl, givenUpdateRegion) if (!cl->enableCursorShapeUpdates) { if(cl->cursorX != cl->screen->cursorX || cl->cursorY != cl->screen->cursorY) { - rfbRedrawAfterHideCursor(cl); + rfbRedrawAfterHideCursor(cl,updateRegion); LOCK(cl->screen->cursorMutex); cl->cursorX = cl->screen->cursorX; cl->cursorY = cl->screen->cursorY; UNLOCK(cl->screen->cursorMutex); - rfbRedrawAfterHideCursor(cl); + rfbRedrawAfterHideCursor(cl,updateRegion); } rfbShowCursor(cl); } |