Problems with Event Queue

Mark Surles surles at robinett.cs.unc.edu
Wed Jun 13 23:15:07 AEST 1990


I'm writing a program which uses a library of existing code, and I'm
having trouble with the event queue.  My program needs to look at the
events on the queue to determine which code (mine or the library's)
should get each event.

I initally did a qread() to look at the event, and then if my code
didn't need it I did a qenter() to put it back for the library.
This does NOT work, because qenter() puts the event at the END of the
queue - the order of events gets messed up.

For most event types I can just do a qtest() to get the event
type - I can keep track of the current window to determine what window
the event is for.  For Window Manager events, however, I need
to look at the value field of the event as well as the event type
(which window needs a Redraw, etc.).

Is there any way to get both the event type and the value
without dequeueing the event?  Or, can I read the event and then
somehow put it back at the FRONT of the queue?

Has anyone dealt with this?  Is there a solution?

Thanks,
Mark Surles
surles at cs.unc.edu



More information about the Comp.sys.sgi mailing list