tgades@stolaf.edu (Anthony M Gades) (06/18/91)
Is there a way to flush all of the X Event buffer, even if there is nothing for the Events to do. For example, if there are a couple of Button Presses in the buffer, and I want to get rid of them before I continue on to the next section of the program (it is important that there are no such events in the buffer) can I delete them. XFlush(theDisp); works great if there is something for the events to do. I just want to delete the events, or map them to a no-op function. Please email with any help thanks, tgades@stolaf.edu -- -------------------------------------------------------------- Tony Gades St. Olaf College, Northfield, MN 55057 email: tgades@stolaf.edu tel (507)-663-2725
hill@luke.lanl.GOV (Jeff Hill) (06/18/91)
>Is there a way to flush all of the X Event buffer ... >For example, if there are a couple of Button Presses in the buffer, >and I want to get rid of them ... XSync() has an option for removing ALL events. A less destructive alternative might be to test for these events (and remove them) with XCheckTypedEvent(). Look at synchronous pointer grabs if it is important to handle events which occur during state changes in the server differently. Such as while the server is warping (XWarpPointer) the pointer. Jeff