how to tell a window is completely redrawn?

Roland Mainz roland.mainz at nrubsig.org
Sat Mar 12 11:14:06 PST 2005


Irek Szczesniak wrote:
> > > 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?
> > >
> > > I would appreciate your time and advice.

You can use the Multibuffer extension and listen to the events after you
have swapped the buffers. The idea is that you draw into the backbuffer
and then call |XmbufDisplayBuffers()| to swap this buffer into the
foreground. If this buffer swapping has been completed a
|XmbufUpdateNotifyEvent| even will be send to notify the application
that the buffer swapping is complete and therefore all the drawings are
visible in the window (=this method is bullet-proof :)

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the xorg mailing list