disable_grabserver(rdpy_ctrl); disable_grabserver(rdpy_data);
disable_grabserver(rdpy_ctrl, 0); disable_grabserver(rdpy_data, 0);
void initialize_xrecord(void) {	use_xrecord = 0;	if (! xrecord_present) {		return;	}	if (nofb) {		return;	}#if LIBVNCSERVER_HAVE_RECORD	rr_CA = XRecordAllocRange();	rr_CW = XRecordAllocRange();	if (! rr_CA || ! rr_CW) {		return;	}	/* protocol request ranges: */	rr_CA->core_requests.first = X_CopyArea;	rr_CA->core_requests.last  = X_CopyArea;		rr_CW->core_requests.first = X_ConfigureWindow;	rr_CW->core_requests.last  = X_ConfigureWindow;	/* open a 2nd control connection to DISPLAY: */	rdpy_ctrl = XOpenDisplay(DisplayString(dpy));	XSync(dpy, True);	XSync(rdpy_ctrl, True);	/* open datalink connection to DISPLAY: */	rdpy_data = XOpenDisplay(DisplayString(dpy));	if (!rdpy_ctrl || ! rdpy_data) {		return;	}	disable_grabserver(rdpy_ctrl);	disable_grabserver(rdpy_data);	use_xrecord = 1;#endif}