Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: XtMainLoop -vs- XtAppMainLoop Message-ID: <997@bacchus.dec.com> Date: 16 Dec 88 16:23:22 GMT References: <8812151918.AA09798@intrepid.riacs.edu> Organization: DEC Western Software Lab Lines: 21 An application context holds all the state necessary to process one "logical application". Its principal element is a list of the displays this application has open. This list is used by XtAppMainLoop to see which displays it should look at for input. To start an application, you call XtToolkitInitialize to initialize the toolkit, XtCreateApplicationContext to create an application context, and XtAppCreateShell to create an application shell. For backwards compatibility, and to make it easier to write simple programs, there is a call XtInitialize that does all this for you and creates a hidden, default application context. This default application context is used in XtMainLoop (and XtNextEvent, XtPending...). So the long and short of it is, if you use XtInitialize, you should use XtMainLoop. If you create an application context explicitly using XtCreateApplicationContext you should use XtAppMainLoop and pass your application context in. -paul asente asente@decwrl.dec.com decwrl!asente