Tk2.1 and Xt have different X connections, and XtAppNextEvent will
block is there is nothing coming from the X connection. One way
of fixing this is get the connection number of Tk using
and using XtAddInput to register this with the Xt event handler. The
callback procedure for XtAddInput wrapper procedure that runs
Tk_OneEvent(1). There might be problems with Tk file sources which
aren`t registered with Xt.
Thanks to email@example.com (Joe Wang) for this information.