diff options
author | dscho <dscho> | 2001-10-10 23:56:04 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-10-10 23:56:04 +0000 |
commit | 519a8e0e399bf44893f2d61a3676f3257ab8d201 (patch) | |
tree | ee56f840edc32fc080adb4acbe83774ff6bdfebb /main.c | |
parent | fad7881732f39780fecd0a0c678392f002b88e26 (diff) | |
download | libtdevnc-519a8e0e399bf44893f2d61a3676f3257ab8d201.tar.gz libtdevnc-519a8e0e399bf44893f2d61a3676f3257ab8d201.zip |
copyrect corrections, fd_set in rfbNewClient, dox in rfb.h for pthreads
problem
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -75,6 +75,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in while((cl=rfbClientIteratorNext(iterator))) { LOCK(cl->updateMutex); if(cl->useCopyRect) { + sraRegionPtr modifiedRegionBackup; if(!sraRgnEmpty(cl->copyRegion) && (cl->copyDX!=dx || cl->copyDY!=dy)) { sraRgnOr(cl->copyRegion,cl->modifiedRegion); sraRgnMakeEmpty(cl->copyRegion); @@ -83,6 +84,13 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in cl->copyDX = dx; cl->copyDY = dy; + /* if there were modified regions, which are now copied: */ + modifiedRegionBackup=sraRgnCreateRgn(cl->modifiedRegion); + sraRgnOffset(modifiedRegionBackup,dx,dy); + sraRgnAnd(modifiedRegionBackup,cl->copyRegion); + sraRgnOr(cl->modifiedRegion,modifiedRegionBackup); + sraRgnDestroy(modifiedRegionBackup); + /* while(!sraRgnEmpty(cl->copyRegion)) */ { #ifdef HAVE_PTHREADS if(!cl->screen->backgroundLoop) |