XtInputMask mask;
int i = 0;
xt_event_dispatch (gpointer  source_data,                    GTimeVal *current_time,                    gpointer  user_data){  XEvent event;  Display * display;  XtAppContext ac;  XtInputMask mask;  display = (Display *)user_data;  ac = XtDisplayToApplicationContext(display);  GDK_THREADS_ENTER ();  while((mask = XtAppPending(ac)) > 0)    XtAppProcessEvent(ac, mask);  GDK_THREADS_LEAVE ();  return TRUE;  }