bzs@BU-CS.BU.EDU (Barry Shein) (12/21/87)
System: Sun3/160, SunOS 3.4, X11R1 patches thru the 30s somewhere Problem: I am trying to do an XGetImage() of the area under a window, strategy was: Unmap, XGetImage of root corresponding to area, re-map. It's unpredictable whether I get a still-damaged area or not. So: Try various events on the root-window, no luck, can get them but none seem to indicate that damage repair has completed. Then: Try napping for a short period (1/10 second), that works fine but obviously the wrong way to go. Questions: Is the approach crocked (unmapping then XGetImage of root)? Better way? A way to delay the XGetImage till damage repair is complete? Or am I being bitten by a bug of some sort (that is, if you think it *should* have worked otherwise just tell me, bugs I can deal with, conceptual problems are a whole 'nother can-o-worms.) -Barry Shein, Boston University P.S. If you must know I was just playing with various calls in preparation for a larger project. This program acts as a magnifying glass on the bits under the window. Just cute mostly, but I do need the underlying operations later.
RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (12/21/87)
There is no mechanism defined to receive notification that window damage has been repaired (note that it would have to be clients that generated such notification). In the case of the root window, if you believe that its contents consist solely of the server-replicated background, then any damage is guaranteed to have been repaired as a side-effect of any action that caused the damage, and you don't need notification. If some client is maintaining the contents, however, you are out of luck (unless you attempt to define some new convention, but good luck getting normal clients to follow it).