xevents()
xevents(void)
xevents(){	XEvent event;	XtInputMask input_mask;	register TScreen *screen = &term->screen;	if(screen->scroll_amt)		FlushScroll(screen);	/*	 * process timeouts, relying on the fact that XtAppProcessEvent	 * will process the timeout and return without blockng on the	 * XEvent queue.  Other sources i.e. the pty are handled elsewhere	 * with select().	 */	while ((input_mask = XtAppPending(app_con)) & XtIMTimer)		XtAppProcessEvent(app_con, XtIMTimer);	/*	 * If there's no XEvents, don't wait around...	 */	if ((input_mask & XtIMXEvent) != XtIMXEvent)	    return;	do {		if (waitingForTrackInfo)			return;		XtAppNextEvent (app_con, &event);		/*		 * Hack to get around problems with the toolkit throwing away		 * eventing during the exclusive grab of the menu popup.  By		 * looking at the event ourselves we make sure that we can		 * do the right thing.		 */		if(OUR_EVENT(event, EnterNotify))		  DoSpecialEnterNotify (&event.xcrossing);		else		if(OUR_EVENT(event, LeaveNotify))		  DoSpecialLeaveNotify (&event.xcrossing);		if (!event.xany.send_event ||		    screen->allowSendEvents ||		    ((event.xany.type != KeyPress) &&		     (event.xany.type != KeyRelease) &&		     (event.xany.type != ButtonPress) &&		     (event.xany.type != ButtonRelease)))		    XtDispatchEvent(&event);	} while ((input_mask = XtAppPending(app_con)) & XtIMXEvent);}