while (read(private.mouse_fd, &wsev, sizeof(wsev)) > 0) {
while (read(private.wsmouse_fd, &wsev, sizeof(wsev)) > 0) {
void wsmouse_io(void){	struct wscons_event wsev;	xEvent x_event;	DeviceIntPtr device;	device = (DeviceIntPtr)LookupPointerDevice();	while (read(private.mouse_fd, &wsev, sizeof(wsev)) > 0) {		/* Get the time of the event as near as possible */		x_event.u.keyButtonPointer.time = TSTOMILLI(wsev.time);		switch (wsev.type) {		case WSCONS_EVENT_MOUSE_UP:			x_event.u.u.type = ButtonRelease;			x_event.u.u.detail = wsev.value;			mieqEnqueue(&x_event);			break;		case WSCONS_EVENT_MOUSE_DOWN:			x_event.u.u.type = ButtonPress;			x_event.u.u.detail = wsev.value;			mieqEnqueue(&x_event);			break;		case WSCONS_EVENT_MOUSE_DELTA_X:			miPointerDeltaCursor(mouse_accel(device, wsev.value),			    0, TSTOMILLI(wsev.time));			break;		case WSCONS_EVENT_MOUSE_DELTA_Y:			miPointerDeltaCursor(mouse_accel(device, wsev.value),			    0, TSTOMILLI(wsev.time));			break;		default:			/* Do anything with other events? */			break;		}	}}