Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!shamash!hare.udev.cdc.com!slc1290 From: slc1290@hare.udev.cdc.com (steve chesney x4662) Newsgroups: comp.windows.x.motif Subject: Synthetic Event needed. Message-ID: <24985@shamash.cdc.com> Date: 24 Aug 90 19:40:25 GMT Sender: news@shamash.cdc.com Reply-To: slc1290@hare.udev.cdc.com (steve chesney x4662) Organization: Control Data Corporation Lines: 39 Because our Motif application is a port from a screen based application, there is considerable processing between invocations of the standard X Event Loop mechanism. Since we destroy widgets in this mainline code, we frequently flush the event queues after each XtDestroyWidget to minimize the chance of partially destroyed widgets giving us grief. The flush is done with something like this: /* Loop until there are no more pending events. */ while (XtPending()) { /* Get the next event to process. */ XtNextEvent(&Event); if (Event.type == ClientMessage) { /* Strip-off inter-client communication events for application messages. */ if (StripApplicationICInputEvent(&Event) != -1) continue; } /* Let the X toolkit dispatch all other event types, and inter-client communication events that are not IC messages. */ XtDispatchEvent(&Event); } Sometimes this is called when there are no server events to Dispatch and it does not get to the XtDispatchEvent and thus does not do pase 2 of the widget destroy process. At other times it seems to block at the XtNextEvent call; at these times the user is forced to hit a key or wiggle the mouse to shove an event through and unfreeze the application. I need a way to mimic a server event (it should be a do-nothing) so that at each flush there is at least one event to get and dispatch immediately. Can I use XSencEvent for this, and if so, how do I set it up? Thanks! Steve Chesney Control Data Corporation slc1290@hare.udev.cdc.com