Re: how to tell a window is completely redrawn?
Irek Szczesniak <ijs@...
2005-03-08 23:34:00 GMT
Thank you for your e-mail! I appreciate your advice.
On Tue, 8 Mar 2005, Deron Johnson wrote:
> However, if the XGetImage is in another process from the one doing
> the drawing, you'll have to establish your own interprocess
> communication protocol for the app to tell your XGetImage process
> when it has flushed its final drawing request to the X server.
I have no way of establishing such a communication. These
applications do not know that I want to take pictures of their
windows. Modifying the applications and recompiling them is not
> In general, if you want to make sure that the rendering of an
> arbitrary X request has been written to the frame buffer, you simply
> need to do an XFlush followed by an XGetImage of one pixel from the
> window. This is sufficient to ensure that the contents of all
> rendering queues (including those in the DDX and the hardware
> itself) have been flushed out to the frame buffer.
Based on what you wrote, I tested this:
image = XGetImage (dpy, window, x, y, 1, 1, AllPlanes, format);
image = XGetImage (dpy, window, x, y, width, height, AllPlanes, format);
Unfortunately, it does not work as expected, i.e. I get a picture of