X_UNLOCK;
void initialize_xevents(void) {	static int did_xselect_input = 0;	static int did_xcreate_simple_window = 0;	static int did_vnc_connect_prop = 0;	static int did_xfixes = 0;	static int did_xdamage = 0;	static int did_xrandr = 0;	X_LOCK;	if ((watch_selection || vnc_connect) && !did_xselect_input) {		/*		 * register desired event(s) for notification.		 * PropertyChangeMask is for CUT_BUFFER0 changes.		 * XXX: does this cause a flood of other stuff?		 */		XSelectInput(dpy, rootwin, PropertyChangeMask);		did_xselect_input = 1;	}	if (watch_selection && !did_xcreate_simple_window) {		/* create fake window for our selection ownership, etc */		selwin = XCreateSimpleWindow(dpy, rootwin, 0, 0, 1, 1, 0, 0, 0);		did_xcreate_simple_window = 1;	}	X_UNLOCK;	if (xrandr && !did_xrandr) {		initialize_xrandr();		did_xrandr = 1;	}	if (vnc_connect && !did_vnc_connect_prop) {		initialize_vnc_connect_prop();		did_vnc_connect_prop = 1;	}	if (xfixes_present && use_xfixes && !did_xfixes) {		initialize_xfixes();		did_xfixes = 1;	}	if (xdamage_present && !did_xdamage) {		initialize_xdamage();		did_xdamage = 1;	}}