Article View: comp.windows.x
Article #36851Re: Processing toolkit events
From: Paul Asente
Date: Thu, 15 Feb 1990 00:11
Date: Thu, 15 Feb 1990 00:11
26 lines
1261 bytes
1261 bytes
In article <3947@hub.UUCP> tom@bears.ucsb.edu writes:
>I'm trying to process events using the X toolkit in a way that will not
>block when the queue is empty. This is what I'm doing:
>
> XEvent event;
>
> while (XtAppPending(context)) {
> XtAppNextEvent(context, &event);
> XtDispatchEvent(&event);
> }
>
>However, this seems to block when there are no events in the queue. Am
>I doing something wrong, or is this a bug?
Are you using timers or alternate input sources? XtAppPending returns
non-zero when these exist but XtAppNextEvent still blocks if there are no
X events. If this is the case, you might try
while (XtAppPending(context) & XtIMXEvent) {
...
The Intrinsics will add timers themselves if you or the widgets use the
selection mechanism. The widgets may be adding timers themselves.
-paul asente
asente@decwrl.dec.com decwrl!asente
Technical Details
Message-ID:
<2759@bacchus.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!asenteReferences:
<3947@hub.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: Processing toolkit events Message-ID: <2759@bacchus.dec.com> Date: 15 Feb 90 00:11:10 GMT References: <3947@hub.UUCP> Distribution: comp Organization: DEC Western Software Lab Lines: 26