Exemplo n.º 1
0
void
HandleIgnore(Widget w,
      XEvent * event,
      String * params ,
      Cardinal *param_count )
{

    (void) SendMousePosition(w, event);
}
Exemplo n.º 2
0
void
xevents(void)
{
	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);
		else if ((screen->send_mouse_pos == ANY_EVENT_MOUSE
#if OPT_DEC_LOCATOR
			|| screen->send_mouse_pos == DEC_LOCATOR
#endif	/* OPT_DEC_LOCATOR */
								)
		 && event.xany.type == MotionNotify
		 && event.xcrossing.window == XtWindow(term)) {
		    SendMousePosition((Widget)term, &event);
		    continue;
		}

		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);
}