how to tell a window is completely redrawn?

Vladimir Dergachev volodya at mindspring.com
Wed Mar 9 12:20:01 PST 2005



On Wed, 9 Mar 2005, Jonathan Lennox wrote:

> On Tuesday, March 8 2005, "Irek Szczesniak" wrote to "xorg at lists.freedesktop.org" saying:
>
>>>> I need to wait for a window to be completely redrawn, and then take a
>>>> picture of it with XGetImage.  This window is not mine, and the only
>>>> thing I know about it is its ID.
>>>>
>>>> How can I tell that the X server has compeletly redrawn the window?
>
> If you're using a current Xorg server, you could use the Xdamage extension.
> There could be some issues with over-estimation of damage, though.
>
> You could also use Xrecord to actually peek at the requests the window's
> client is sending.
>
> In general, "completely redrawn" is an application-specific concept, so I'd
> imagine you'd need to know some details of how your target application draws
> things.

Just to emphasize this point - the application might be a video player in 
which case it never stops drawing as long as the playback is going on.

One way to do what Irek wants would be to wait until application blocks on 
input - if you know it is sleeping you know it is done doing whatever it 
was doing for the moment.

This would also work with some video playback apps as I would expect that 
frame synchronization might work by waiting for vsync to arrive.

Practical implementation of this is another matter..

                           best

                              Vladimir Dergachev

>
> -- 
> Jonathan Lennox
> lennox at cs dot columbia dot edu
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>



More information about the xorg mailing list