Didier Verna <verna(a)inf.enst.fr> writes:
It's generally a bad idea to use XSync for something else than
debugging, because it synchronizes the application with the server
itself. XSync will return only when the X server has finished processing all
its requests. The consequence is that it can considerably slow down the
application, because you'll be blocked waiting for all events to be processed,
even those completely unrelated to your problem.
OK, so XSync is utterly *evil* :-)
When a synchronization problem occurs, it's almost always the
application's fault (a lack of consistency checking) and always a bad idea to
synchronize with the server. The better solution is to check internally for
consistency. Here it means checking that this window still belongs to a frame
before enquiring the server about an XPointer information.
but, how??? x_any_window_to_frame doesn't cut it. In a vanilla XEmacs,
if the pointer is in the *scratch* buffer I need to traverse some
steps down the Window hierarchy before I get the frame from
x_any_window_to_frame. For the child_window returned by XQueryPointer
I only get NIL :-(
Is this a bug in x_any_window_to_frame or is that only supposed to
work for the leaf windows and scrollbars and stuff???
Gunnar