Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!decwrl!asente
From: asente@decwrl.dec.com (Paul Asente)
Newsgroups: comp.windows.x
Subject: Re: Measuring Response Time
Message-ID: <1861@bacchus.dec.com>
Date: 25 Sep 89 06:59:13 GMT
References: <1996@cbnewsl.ATT.COM>
Distribution: usa
Organization: DEC Western Software Lab
Lines: 23

In article <1996@cbnewsl.ATT.COM> wbh@cbnewsl.ATT.COM (william.huston) writes:
>It seems to me that I should be able to make the the client request
>for display (e.g., realize a new window/widget via XtRealize()), and be
>able to time the interval until the server is done displaying the window.
>I have tried using XSync(), Xflush(), and XQueryPointer() as ways to 
>flush event queues and to wait for the server to respond, but these
>functions all seem to return before the display is updated.

XSync should do what you want; it will not return until all queued
requests have been processed by the server.  What you are probably
observing is that the window manager is catching the map requests, so that
all the server is doing to process the map is to send it off to the window
manager.  The map doesn't actually happen until the window manager gets
around to doing it.

What you need is a way of knowing that all the initial expose events have
been processed by the widgets and that they have sent their drawing
requests.  Unfortunately I can't think of any way to do this reliably
since the protocol doesn't define whether expose events for a parent occur
before or after those for a child.

	-paul asente
	    asente@decwrl.dec.com	decwrl!asente