Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: breaking out of XtMainLoop() Keywords: X Toolkit, XtMainLoop Message-ID: <1344@bacchus.dec.com> Date: 19 Apr 89 04:16:00 GMT References: <44097@tut.cis.ohio-state.edu> Organization: DEC Western Software Lab Lines: 25 In article <44097@tut.cis.ohio-state.edu> writes: >Someone else must have wanted to do this, so pleeeease give me a clue >because at the moment I am without one! I am trying to keep at the X >Toolkit level, without trying to rewrite a main loop or use too many >Xlib routines. Don't be afraid to write your own main loop! XtAppMainLoop is just intended as a convenience. Here's the code: void XtAppMainLoop(app) XtAppContext app; { XEvent event; for (;;) { XtAppNextEvent(app, &event); XtDispatchEvent(&event); } } As you can see, it only uses public interfaces. You can use XtNextEvent instead of XtAppNextEvent if you are using the default application context. -paul asente asente@decwrl.dec.com decwrl!asente