[comp.windows.x] XtMainLoop return

kiwi@iis.ethz.ch (Rene Mueller) (03/16/91)

hi x-users:
	i have a problem: i search an escape of XtMainLoop without exit()
	and re-escape after a functioncall back to XtMainLoop !

	 					thank's and bye, bye

cjmchale@cs.tcd.ie (Ciaran McHale) (03/17/91)

In <1991Mar15.164808.15021@bernina.ethz.ch> kiwi@iis.ethz.ch (Rene Mueller) writes:

>hi x-users:
>	i have a problem: i search an escape of XtMainLoop without exit()
>	and re-escape after a functioncall back to XtMainLoop !

If you have a look at the MIT Xt manual you will notice it states that
XtMainLoop() is a trivial procedure. It's of the form:

void
XtMainLoop()
{
	XEvent	ev;

	while (1) {
		XtNextEvent(&ev);
		XtDispatchEvent(&ev);
	}
}

You can implement your own variation of the above to, say, check for a
global flag each time round the loop and taking appropriate action if set.


Ciaran.
-- 
Ciaran McHale		"Verbosity says it all"			      ____
Department of Computer Science, Trinity College, Dublin 2, Ireland.   \  /
Telephone: +353-1-772941 ext 1538	FAX: +353-1-772204	       \/
Telex: 93782 TCD EI			email: cjmchale@cs.tcd.ie