Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-pcd!hpcvlx!ben From: ben@hpcvlx.cv.hp.com (Benjamin Ellsworth) Newsgroups: comp.windows.x Subject: Re: XmForm, XSync and 0 length timeouts Message-ID: <100920259@hpcvlx.cv.hp.com> Date: 7 Dec 90 00:08:09 GMT References: <901201200548.24015@alphalpha> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 44 > If anyone has any ideas on what might be going wrong here, please > let me know. BTW. I did step through the Form widget once when > it was managing the kids and saw that the Form thought it had 4 > kids, not 2. So it's almost like it didn't get rid of 2 for some > reason? I haven't checked what it looks like when it *is* working > though, so I'm not sure on this. Did you check the core.being_destroyed flag in all four children? I believe that 2 of them would have a value of true. Had you gotten back to the event loop between destroying the first two and creating the second two (remember two-phase destroy)? > Now, here comes the second question. What is the difference between > doing a 0 length timeout and an XSync or XFlush (I'm aware of the > difference between the latter two). In particular, there are certain > things which only work if you set up a 0 length timeout (like setting > the focus to a particular widget in a dialog box when you're in the > focusCallback). Would those same things always work if I did an > XSync instead? I find your wording a bit ambiguous. I would restate you as having said: What is the difference between performing an action immediately after an XSync or an XFlush, and performing that action as the callback from a timeout of 0? If I have misunderstood, by all means correct me. To answer the question that I think you're asking. The difference is whether or not XtDispatchEvent has been called or not. In the first case the connection is either sync'ed or flushed and the action is run. In the second case the timeout has waited until the next call of XtDispatchEvent, and XtDispatchEvent is not without "side effects" with respect to timeout-events vs. real X events. ----------------------------------------------------------------------- Benjamin Ellsworth | ben@cv.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------