diff options
Diffstat (limited to 'krfb/libvncserver/cursor.c')
-rw-r--r-- | krfb/libvncserver/cursor.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/krfb/libvncserver/cursor.c b/krfb/libvncserver/cursor.c index 633cc0fe..f13eaaf9 100644 --- a/krfb/libvncserver/cursor.c +++ b/krfb/libvncserver/cursor.c @@ -58,7 +58,7 @@ rfbSendtqCursorShape(cl) if ( pCursor && pCursor->width == 1 && pCursor->height == 1 && - pCursor->tqmask[0] == 0 ) { + pCursor->mask[0] == 0 ) { pCursor = NULL; } @@ -150,9 +150,9 @@ rfbSendtqCursorShape(cl) cl->ublen += pCursor->width*bpp2*pCursor->height; } - /* Prepare transparency tqmask. */ + /* Prepare transparency mask. */ - bitmapData = (CARD8 *)pCursor->tqmask; + bitmapData = (CARD8 *)pCursor->mask; for (i = 0; i < pCursor->height; i++) { for (j = 0; j < bitmapRowBytes; j++) { @@ -199,7 +199,7 @@ rfbSendSoftCursor(rfbClientPtr cl, Bool cursorWasChanged) if ( pCursor && pCursor->width <= 1 && pCursor->height <= 1 && - pCursor->tqmask[0] == 0 ) { + pCursor->mask[0] == 0 ) { pCursor = NULL; } @@ -365,12 +365,12 @@ rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskSt if(*cp!=' ') cursor->source[j*w+i/8]|=bit; if(maskString) { - cursor->tqmask = (unsigned char*)calloc(w,height); + cursor->mask = (unsigned char*)calloc(w,height); for(j=0,cp=maskString;j<height;j++) for(i=0,bit=0x80;i<width;i++,bit=(bit&1)?0x80:bit>>1,cp++) - if(*cp!=' ') cursor->tqmask[j*w+i/8]|=bit; + if(*cp!=' ') cursor->mask[j*w+i/8]|=bit; } else - cursor->tqmask = (unsigned char*)rfbMakeMaskForXCursor(width,height,cursor->source); + cursor->mask = (unsigned char*)rfbMakeMaskForXCursor(width,height,cursor->source); return(cursor); } @@ -378,7 +378,7 @@ rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskSt char* rfbMakeMaskForXCursor(int width,int height,char* source) { int i,j,w=(width+7)/8; - char* tqmask=(char*)calloc(w,height); + char* mask=(char*)calloc(w,height); unsigned char c; for(j=0;j<height;j++) @@ -388,14 +388,14 @@ char* rfbMakeMaskForXCursor(int width,int height,char* source) if(j<height-1) c|=source[(j+1)*w+i]; if(i>0 && (c&0x80)) - tqmask[j*w+i-1]|=0x01; + mask[j*w+i-1]|=0x01; if(i<w-1 && (c&0x01)) - tqmask[j*w+i+1]|=0x80; + mask[j*w+i+1]|=0x80; - tqmask[j*w+i]|=(c<<1)|c|(c>>1); + mask[j*w+i]|=(c<<1)|c|(c>>1); } - return(tqmask); + return(mask); } void rfbFreeCursor(rfbCursorPtr cursor) @@ -404,7 +404,7 @@ void rfbFreeCursor(rfbCursorPtr cursor) if(cursor->richSource) free(cursor->richSource); free(cursor->source); - free(cursor->tqmask); + free(cursor->mask); free(cursor); } @@ -497,7 +497,7 @@ void MakeSoftCursor(rfbClientPtr cl, rfbCursorPtr cursor) for(j=0;j<cursor->height;j++) for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1) - if(cursor->tqmask[j*w+i/8]&bit) { + if(cursor->mask[j*w+i/8]&bit) { if (state) { memcpy(cp,sp,bpp); cp += bpp; @@ -634,7 +634,7 @@ void rfbDrawCursor(rfbScreenInfoPtr s) /* now the cursor has to be drawn */ for(j=0;j<y2;j++) for(i=0;i<x2;i++) - if((c->tqmask[(j+j1)*w+(i+i1)/8]<<((i+i1)&7))&0x80) + if((c->mask[(j+j1)*w+(i+i1)/8]<<((i+i1)&7))&0x80) memcpy(s->frameBuffer+(j+y1)*rowstride+(i+x1)*bpp, c->richSource+(j+j1)*c->width*bpp+(i+i1)*bpp,bpp); @@ -655,7 +655,7 @@ void rfbPrintXCursor(rfbCursorPtr cursor) if(cursor->source[j*w+i]&bit) putchar('#'); else putchar(' '); putchar(':'); for(i=0,i1=0,bit=0x80;i1<cursor->width;i1++,i+=(bit&1)?1:0,bit=(bit&1)?0x80:bit>>1) - if(cursor->tqmask[j*w+i]&bit) putchar('#'); else putchar(' '); + if(cursor->mask[j*w+i]&bit) putchar('#'); else putchar(' '); putchar('\n'); } } |