if (first) { int i; for (i=0; i<SCR_RESULTS_MAX; i++) { scroll_results[i].win = None; scroll_results[i].time = 0.0; scroll_results[i].result = 0; } first = 0; }
int check_xrecord(void) {	int watch_keys = 0, watch_mouse = 0, consider_mouse;	static int first = 1;	static int mouse_wants_back_in = 0;	if (first) {		int i;		for (i=0; i<SCR_RESULTS_MAX; i++) {			scroll_results[i].win = None;			scroll_results[i].time = 0.0;			scroll_results[i].result = 0;		}		first = 0;	}	if (! use_xrecord) {		return 0;	}	if (scaling && ! got_scrollcopyrect) {		return 0;	}if (0) fprintf(stderr, "check_xrecord: IN xrecording: %d\n", xrecording);	if (! xrecording) {		return 0;	}	if (!strcmp(scroll_copyrect, "always")) {		watch_keys = 1;		watch_mouse = 1;	} else if (!strcmp(scroll_copyrect, "keys")) {		watch_keys = 1;	} else if (!strcmp(scroll_copyrect, "mouse")) {		watch_mouse = 1;	}	if (button_mask || mouse_wants_back_in) {		consider_mouse = 1;	} else {		consider_mouse = 0;	}if (0) fprintf(stderr, "check_xrecord: button_mask: %d  mouse_wants_back_in: %d\n", button_mask, mouse_wants_back_in);	if (watch_mouse && consider_mouse && xrecord_set_by_mouse) {		int ret = check_xrecord_mouse();		if (ret == 3) {			mouse_wants_back_in = 1;		} else {			mouse_wants_back_in = 0;		}		return ret;	} else if (watch_keys && xrecord_set_by_keys) {		mouse_wants_back_in = 0;		return check_xrecord_keys();	} else {		mouse_wants_back_in = 0;		return 0;	}}