I am recording xrequests with the xrecord extension for later
playback. I would like to record a snapshot of the screen during
recording, so that I can replay from that point, without having to
build up the screen from all of the previous requests. The snapshot
would record only the xrequests that currently make up the screen.

Does anyone have an idea on how to keep track of the state of the
xwindows session, that is, keep track of which xrequests are currently
relevant to the screen?

For example, if a snapshot contains a window, the state would contain
a create window call to show that window. I know that if the window
is destroyed, I can remove the create window call from the current
state. There is an obvious create/destroy matchup here. But what
about other requests?

Or, if xwindows has handled 10,000 xrequests, how can I keep track of
which xrequests are needed to exactly recreate the final screen?

Joseph Ware