}
} xinerama_present = 1;
void initialize_xinerama (void) {#ifndef LIBVNCSERVER_HAVE_LIBXINERAMA	rfbLog("Xinerama: Library libXinerama is not available to determine\n");	rfbLog("Xinerama: the head geometries, consider using -blackout\n");	rfbLog("Xinerama: if the screen is non-rectangular.\n");#else	XineramaScreenInfo *sc, *xineramas;	sraRegionPtr black_region, tmp_region;	sraRectangleIterator *iter;	sraRect rect;	char *bstr, *tstr;	int ev, er, i, n, rcnt;	if (! XineramaQueryExtension(dpy, &ev, &er)) {		rfbLog("Xinerama: disabling: display does not support it.\n");		xinerama = 0;		return;	}	if (! XineramaIsActive(dpy)) {		/* n.b. change to XineramaActive(dpy, window) someday */		rfbLog("Xinerama: disabling: not active on display.\n");		xinerama = 0;		return;	}	/* n.b. change to XineramaGetData() someday */	xineramas = XineramaQueryScreens(dpy, &n);	rfbLog("Xinerama: number of sub-screens: %d\n", n);	if (n == 1) {		rfbLog("Xinerama: no blackouts needed (only one"		    " sub-screen)\n");		XFree(xineramas);		return;		/* must be OK w/o change */	}	black_region = sraRgnCreateRect(0, 0, dpy_x, dpy_y);	sc = xineramas;	for (i=0; i<n; i++) {		int x, y, w, h;				x = sc->x_org;		y = sc->y_org;		w = sc->width;		h = sc->height;		tmp_region = sraRgnCreateRect(x, y, x + w, y + h);		sraRgnSubtract(black_region, tmp_region);		sraRgnDestroy(tmp_region);		sc++;	}	XFree(xineramas);	if (sraRgnEmpty(black_region)) {		rfbLog("Xinerama: no blackouts needed (screen fills"		    " rectangle)\n");		sraRgnDestroy(black_region);		return;	}	/* max len is 10000x10000+10000+10000 (23 chars) per geometry */	rcnt = (int) sraRgnCountRects(black_region);	bstr = (char *) malloc(30 * rcnt * sizeof(char));	tstr = (char *) malloc(30 * sizeof(char));	bstr[0] = '\0';	iter = sraRgnGetIterator(black_region);	while (sraRgnIteratorNext(iter, &rect)) {		int x, y, w, h;		/* make sure x1 < x2 and y1 < y2 */		if (rect.x1 > rect.x2) {			int tmp = rect.x2;			rect.x2 = rect.x1;			rect.x1 = tmp;		}		if (rect.y1 > rect.y2) {			int tmp = rect.y2;			rect.y2 = rect.y1;			rect.y1 = tmp;		}		x = rect.x1;		y = rect.y1;		w = rect.x2 - x;		h = rect.y2 - y;		sprintf(tstr, "%dx%d+%d+%d,", w, h, x, y);		strcat(bstr, tstr);	}	initialize_blackout(bstr);	free(bstr);	free(tstr);#endif}