summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authordscho <dscho>2001-10-10 23:56:04 +0000
committerdscho <dscho>2001-10-10 23:56:04 +0000
commit519a8e0e399bf44893f2d61a3676f3257ab8d201 (patch)
treeee56f840edc32fc080adb4acbe83774ff6bdfebb /main.c
parentfad7881732f39780fecd0a0c678392f002b88e26 (diff)
downloadlibtdevnc-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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index ea85123..478d8d8 100644
--- a/main.c
+++ b/main.c
@@ -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)