Path: utzoo!attcan!uunet!husc6!bloom-beacon!WSL.DEC.COM!haynes From: haynes@WSL.DEC.COM Newsgroups: comp.windows.x Subject: Re: X Toolkit and continuous graphic output Message-ID: <8807251844.AA25976@gilroy.pa.dec.com> Date: 25 Jul 88 18:44:52 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 23 [Rusty sent me a message explaining that the program he was trying to adapt was basically a "black box" and it's behaviour couldn't be guaranteed, and certainly couldn't be modified. Here is my reply.] Well, as usual with the toolkit there is a fifth, very obscure and slightly dangerous way of doing what you want. I don't normally recommend it since it can get you into serious trouble, but Xlib lets you register a procedure to be called as X events come in, and before they are queued on Xlib's event queue. You can dispatch from this procedure, but because it is truly asynchronous, you are letting yourself in for all sorts of potential trouble. As long as you do ALL event dispatching from this routine, and make sure that you finish processing an event before you dispatch the next one, you should be safe. Realize that you will be operating in the far outer limits of expected Xlib and toolkit behaviour, and be conservative about what you want to accomplish, and you should be able to get away with it. I don't remember precisely, but one of the potential pitfalls is that you may be dispatching events into the toolkit while Xlib has the display structure locked. If true, this will make it difficult (impossible!) to do Xlib calls in your toolkit routines. -- Charles