Port xnetevents (I hope this works).