Path: utzoo!attcan!uunet!cs.utexas.edu!husc6!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: Handling expose events. Message-ID: <8908221149.AA05812@expire.lcs.mit.edu> Date: 22 Aug 89 11:49:43 GMT References: <8908220058.AA08564@mote.umb.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 33 What I would like to do is get X to tell me when part of the window is obscured; that seems like the VisibilityNotify event. Only sort-of. It tells you when you've become obscured, but it doesn't tell you each time a new piece becomes obscured. It looked like (a) those coordinates are not available to me (I suspect I'm wrong about this), No, you are correct. and (b) XGetImage is not guaranteed to work on obscured parts of windows, and I only get the event after the window is obscured, so I'm up the creek... Right. For example, is it somehow possible to use Xt to handle the Expose events, but deal with the drawing myself? Nope, Xt won't solve this problem for you. is it possible to handle expose events using Xlib if a bitmap of the window's contents is not kept by the program? Not in the way you apparently want. The application is ultimately responsible for window contents, and must be able to regenerate them. Your application is (somehow) generating the contents to begin with, it should be a SMOP to use that code to refresh after exposures. You can turn on backing-store for the window if you think it's very expensive to generate the contents, but this is only a hint to the server, and you can't rely on backing-store staying around.