Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: dshr@eng.sun.COM (David Rosenthal) Newsgroups: comp.windows.x Subject: Re: PC X servers / backing store Message-ID: <9103051609.AA02015@devnull.Eng.Sun.COM> Date: 5 Mar 91 15:58:10 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 33 > Correct behavior should be to send an expose event to initialise > any un-initialised portion of the backing store pixmap, whenever the window > is raised. (This would be to prevent breaking any clients that only expect > expose events when the window is raised.) This would also cope properly > with a situation in which memory for the backing store pixmap becomes available > sometime after a client has started. The backing store could be assumed to > have been initialised if written to prior to being raised. > Correct behaviour is defined by the protocol spec (page 474 of the Digital Press 2nd edition): "This event [Expose] is reported to clients selecting Exposure on the window. It is generated when no valid contents are available for regions of the window, and either: - the regions are visible, - the regions are viewable and the server is (perhaps newly) maintaining backing store on the window, - or the window is not viewable but the server is (perhaps newly) honoring [the] window's backing-store attribute of Always or WhenMapped. What this means is that you should select for Exposure in the CreateWindow if the backing-store attribute is Always, because the server will generate the Expose immediately and if you aren't listening it will be lost, and never de-select Exposure on a window that has backing-store Always, because the server may decide to start maintaining it at any time. This is good practice if the window has backing-store WhenMapped, because otherwise there are potential race conditions between the map/unmap and the select/deselect of Exposure that you are unlikely to get right. David.