From 641012310eebe3a129c8a1939c3f8c9cd645ef50 Mon Sep 17 00:00:00 2001 From: dscho Date: Sat, 29 Sep 2001 15:29:13 +0000 Subject: [PATCH] nother try --- TODO | 2 ++ cursor.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 9ae48c1..2f55df5 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,8 @@ immediate: fix bug in http (java) client with big endian server: byte swapping is broken cursor "smears" sometimes when not using cursor encoding really support pthreads. + - cursor seems to be undrawn wildly + - connection gone and then reconnect is a problem in the works: ------------- diff --git a/cursor.c b/cursor.c index c86e377..19897bb 100644 --- a/cursor.c +++ b/cursor.c @@ -224,7 +224,10 @@ rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskSt rfbCursorPtr cursor = (rfbCursorPtr)calloc(1,sizeof(rfbCursor)); char* cp; unsigned char bit; - + +#ifdef HAVE_PTHREADS + pthread_mutex_init(&cursor->mutex, NULL); +#endif cursor->width=width; cursor->height=height; //cursor->backRed=cursor->backGreen=cursor->backBlue=0xffff; @@ -272,6 +275,9 @@ char* rfbMakeMaskForXCursor(int width,int height,char* source) void rfbFreeCursor(rfbCursorPtr cursor) { if(cursor) { +#ifdef HAVE_PTHREADS + pthread_mutex_destroy(&cursor->mutex); +#endif free(cursor->source); free(cursor->mask); free(cursor);