} else if (now < last_keyboard_time + reset_idle)  {
} else if (now < last_keyboard_time + require_idle)  {
void check_xrecord_reset(int force) {	static double last_reset = 0.0;	int reset_time  = 90, reset_idle  = 10;	int reset_time2 = 600, reset_idle2 = 40;	double now;	XErrorHandler old_handler = NULL;	if (gdpy_ctrl) {		X_LOCK;		check_xrecord_grabserver();		X_UNLOCK;	} else {		/* more dicey if not watching grabserver */		reset_time = reset_time2;		reset_idle = reset_idle2;	}	if (!use_xrecord) {		return;	}	if (xrecording) {		return;	}	if (button_mask) {		return;	}	if (xserver_grabbed) {		return;	}#if LIBVNCSERVER_HAVE_RECORD	if (! rc_scroll) {		return;	}	now = dnow();	if (last_reset == 0.0) {		last_reset = now;		return;	}	/*	 * try to wait for a break in input to reopen the displays	 * this is only to avoid XGrabServer deadlock on the repopens.	 */	if (force) {		;	} else if (now < last_reset + reset_time) {		return;	} else if (now < last_pointer_click_time + reset_idle)  {		return;	} else if (now < last_keyboard_time + reset_idle)  {		return;	}	X_LOCK;	trapped_record_xerror = 0;	old_handler = XSetErrorHandler(trap_record_xerror);	/* unlikely, but check again since we will definitely be doing it. */	if (gdpy_ctrl) {		check_xrecord_grabserver();		if (xserver_grabbed) {			XSetErrorHandler(old_handler);			X_UNLOCK;			return;		}	}		shutdown_record_context(rc_scroll, 0, 1);	rc_scroll = 0;	XSetErrorHandler(old_handler);	X_UNLOCK;	last_reset = now;#endif}