if (screen) { UNLOCK(screen->cursorMutex); } rfbLog("  done.\n");
static void setup_cursors(void) {	/* TODO clean this up if we ever do more cursors... */	rfbCursorPtr rfb_curs;	int i, n = 0;	cur_arrow.data	= curs_arrow_data;	cur_arrow.mask	= curs_arrow_mask;	cur_root.data	= curs_root_data;	cur_root.mask	= curs_root_mask;	cur_plus.data	= curs_plus_data;	cur_plus.mask	= curs_plus_mask;	cur_fleur.data	= curs_fleur_data;	cur_fleur.mask	= curs_fleur_mask;	cur_xterm.data	= curs_xterm_data;	cur_xterm.mask	= curs_xterm_mask;	cursors[CURS_ARROW] = &cur_arrow;	n++;	cursors[CURS_ROOT]  = &cur_root;	n++;	cursors[CURS_WM]    = &cur_fleur;	n++;	cursors[CURS_TERM]  = &cur_xterm;	n++;	for (i=0; i<n; i++) {		cursor_info_t *ci = cursors[i];		ci->data = strdup(ci->data);		ci->mask = strdup(ci->mask);		rfb_curs = rfbMakeXCursor(ci->wx, ci->wy, ci->data, ci->mask);		if (ci->reverse) {			rfb_curs->foreRed   = 0x0000;			rfb_curs->foreGreen = 0x0000;			rfb_curs->foreBlue  = 0x0000;			rfb_curs->backRed   = 0xffff;			rfb_curs->backGreen = 0xffff;			rfb_curs->backBlue  = 0xffff;		}		rfb_curs->xhot = ci->sx;		rfb_curs->yhot = ci->sy;		rfb_curs->cleanup = FALSE;		rfb_curs->cleanupSource = FALSE;		rfb_curs->cleanupMask = FALSE;		rfb_curs->cleanupRichSource = FALSE;		ci->rfb = rfb_curs;	}}