Path: utzoo!attcan!uunet!husc6!bloom-beacon!bu-cs!purdue!decwrl!hplabs!hpl-opus!hpccc!hp-sde!hpfcdc!hpfclp!diamant From: diamant@hpfclp.SDE.HP.COM (John Diamant) Newsgroups: comp.windows.x Subject: Re: X docs needed Message-ID: <9740024@hpfclp.SDE.HP.COM> Date: 18 May 88 21:14:10 GMT References: <5600@chinet.UUCP> Organization: HP SDE, Fort Collins, CO Lines: 22 > If you mean 'call XNextEvent myself', then you're very likely to get into > trouble. If you merely want to register an event handler, that is > definitely supported, though you currently need a widget wrapper under > which to do so. If you want block-for-input style interfaces, then > you'll have to write some widgets that simulate this behavior and that > export blocking style procedural interfaces. I have implemented a functional interface to some routines that I needed to have block until a particular button was pressed. I called XtNextEvent and XtDispatchEvent in my own loop (terminating on a condition set by a callback on the button). It seems to work fine for blocking. Once the button is pressed, it falls through and causes my function to return. Then, the real XtMainLoop() takes over again. Is there something wrong with doing this (it appears to work fine)? My function which invoked this was called by a callback associated with another button, so the XtDispatchEvent from the real XtMainLoop was on the stack at the time. John Diamant Software Development Environments Hewlett-Packard Co. ARPA Internet: diamant@hpfclp.sde.hp.com Fort Collins, CO UUCP: {hplabs,hpfcla}!hpfclp!diamant