Path: utzoo!attcan!uunet!convex!killer!osu-cis!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!ames!vsi1!daver!athsys!jim From: jim@athsys.uucp (Jim Becker) Newsgroups: comp.windows.x Subject: Re: asyncronous event notification Message-ID: <199@tityus.UUCP> Date: 23 Nov 88 23:25:11 GMT References: <111@dlcdev.UUCP> Organization: Athena Systems, Inc., Sunnyvale, CA Lines: 26 From article <111@dlcdev.UUCP>, by evt@dlcdev.UUCP (Eric Van Tassell): > Well I'm still trying although I answered my previous posting. Still the > general question remains: "What is a body to do if polling with XNextEvent > is too slow"? tia > > > dlcdev!eric@eddie.mit.edu I'm not sure if this fits your need, but a dirty little way to see if there are events pending is by looking at the display structure. The "head" element points to the first pending XEvent structure (in a _XSQEvent structure); the "qlen" element is a count of the number of pending XEvents in the input event queue. Note that there may be further events that the process will get that haven't come back because of buffering on in/output of the events. Before the MIT people flame me, let me say that I don't normally go into this detail of looking at the X "internal" structures - and it probabily isn't a good long term idea. It is one method to figure out if there are events that have gotten to you that can be directly gotten and processed w/o waiting though. Hope this helps! -Jim Becker