summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authordscho <dscho>2001-10-07 02:59:57 +0000
committerdscho <dscho>2001-10-07 02:59:57 +0000
commit87c12192da6d0742988e2f95384a2dd78a2d5671 (patch)
tree0517c849cf90ac0b96a31519afa11c5d423482c8 /main.c
parent446f334cc1ee67b280e218ae58fef34d5b063cea (diff)
downloadlibtdevnc-87c12192da6d0742988e2f95384a2dd78a2d5671.tar.gz
libtdevnc-87c12192da6d0742988e2f95384a2dd78a2d5671.zip
font corrections, displayHook
Diffstat (limited to 'main.c')
-rw-r--r--main.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/main.c b/main.c
index 2c682af..d1e1797 100644
--- a/main.c
+++ b/main.c
@@ -75,22 +75,28 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
while((cl=rfbClientIteratorNext(iterator))) {
LOCK(cl->updateMutex);
if(cl->useCopyRect) {
+ if(!sraRgnEmpty(cl->copyRegion) && (cl->copyDX!=dx || cl->copyDY!=dy)) {
+ sraRgnOr(cl->copyRegion,cl->modifiedRegion);
+ sraRgnMakeEmpty(cl->copyRegion);
+ }
sraRgnOr(cl->copyRegion,copyRegion);
cl->copyDX = dx;
cl->copyDY = dy;
-
+
+ /* while(!sraRgnEmpty(cl->copyRegion)) */ {
#ifdef HAVE_PTHREADS
- if(cl->screen->backgroundLoop) {
- SIGNAL(cl->updateCond);
- UNLOCK(cl->updateMutex);
- LOCK(cl->updateMutex);
- } else
+ if(cl->screen->backgroundLoop) {
+ SIGNAL(cl->updateCond);
+ UNLOCK(cl->updateMutex);
+ LOCK(cl->updateMutex);
+ } else
#endif
- {
- sraRegionPtr updateRegion = sraRgnCreateRgn(cl->modifiedRegion);
- sraRgnOr(updateRegion,cl->copyRegion);
- rfbSendFramebufferUpdate(cl,updateRegion);
- sraRgnDestroy(updateRegion);
+ {
+ sraRegionPtr updateRegion = sraRgnCreateRgn(cl->modifiedRegion);
+ sraRgnOr(updateRegion,cl->copyRegion);
+ rfbSendFramebufferUpdate(cl,updateRegion);
+ sraRgnDestroy(updateRegion);
+ }
}
} else {
sraRgnOr(cl->modifiedRegion,copyRegion);
@@ -457,7 +463,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv,
rfbScreen->colourMap.is16 = 0;
rfbScreen->colourMap.data.bytes = NULL;
- if(bytesPerPixel == 8) {
+ if(bytesPerPixel == 1) {
format->redMax = 7;
format->greenMax = 7;
format->blueMax = 3;
@@ -500,6 +506,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv,
rfbScreen->getCursorPtr = defaultGetCursorPtr;
rfbScreen->setTranslateFunction = rfbSetTranslateFunction;
rfbScreen->newClientHook = doNothingWithClient;
+ rfbScreen->displayHook = 0;
/* initialize client list and iterator mutex */
rfbClientListInit(rfbScreen);