Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: event-driven X11 Message-ID: <8906291418.AA02019@LYRE.MIT.EDU> Date: 29 Jun 89 14:18:55 GMT References: <5303@pt.cs.cmu.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 20 > Date: 23 Jun 89 15:56:22 GMT > From: pie1.mach.cs.cmu.edu!egc@pt.cs.cmu.edu (eddie caplan) > with XToolkit i am even worse off. i must call a never-returning XtMainLoop() > which prevents me from using the XCheckIfEvent() solution. No, there's no requirement that every application call XtMainLoop; it's merely there as a convenience for those applications which choose to be event-driven. There's nothing at all preventing you from learning in some way that there are X events in the queue, fetching one of those events, and then giving it to Xt to process. If your application also uses Xt timers or alternate inputs, then you'll have to be careful to call XtAppProcessEvent occasionally to get them processed, but it doesn't seem likely you'll be using event-driven timers & input callbacks if you're writing an application in some other style. What I suspect you really need is an entire operating (system) environment that gives real semantics for asynchronous i/o. X already exists (happily) for such worlds. :-)