Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!bloom-beacon!MAPS.CS.CMU.EDU!Jean-Christophe.Dhellemmes From: Jean-Christophe.Dhellemmes@MAPS.CS.CMU.EDU Newsgroups: comp.windows.x Subject: Browsing Event Queue Message-ID: <9009121836.AA16685@ATHENA.MIT.EDU> Date: 12 Sep 90 18:35:53 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 36 Hello out there, I use X11R4 and the Xt toolkit. In one of my applications, a refresh procedure takes a long time to execute (drawing thousands of segments in a window). While it is going on, it is possible to resize, or reexpose the window in which it is drawing, thus making the current state out of date. The problem is I still have to wait a long time before the refresh procedure stops and starts again with the new parameters. I would like to be able to browse through the entire event queue in my refresh loop and interrupt the refresh loop if an expose or resize event is in the queue. I know how to get the first event in the queue without removing it (XtAppPeekEvent()) but as an XEvent structure does not include a pointer to the next event, I don't know how to go through the entire queue. I think that XtAppPeekEvent copies the data to the user's XEvent structure, so casting the returned event in a _XQEvent structure will not work (it is a hack, anyway). - Is there an official way to do what I need (like getting a pointer to the event queue) ? - Is there another method ? Any info will be highly appreciated. Thanks. * ][] --------------------------------------------------------------------------- Jean-Christophe DHELLEMMES. e-mail (jcd@maps.cs.cmu.edu) (412-268-8801) Carnegie Mellon University - School of Computer Science. 5000 Forbes avenue Pittsburgh PA 15213. ---------------------------------------------------------------------------