DRI (and probably NVGLX) needs to be notified when windows become redirected, so it can notify the client that it needs to move its front buffer offscreen; and do the reverse when the redirection is undone. Currently there's no way to do this.
*** Bug 1208 has been marked as a duplicate of this bug. ***
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
I'm not sure anymore why I wrote this. At any rate, you can wrap ->SetWindowPixmap to do this, I believe.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.