Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!labtam!krite!graeme From: graeme@krite.labtam.oz (Graeme Gill) Newsgroups: comp.windows.x Subject: Re: PC X servers / backing store Summary: Why does "backing store always" break clients ? Message-ID: <10073@krite.labtam.oz> Date: 5 Mar 91 03:39:16 GMT References: <9103032356.AA00215@devnull.Eng.Sun.COM> Organization: Labtam Australia Pty. Ltd., Melbourne, Australia Lines: 33 > "A backing-store of WhenMapped advises the server that maintaining > contents of obscured regions when the window is mapped would be > benficial. A backing store of Always advises the server that > maintaining contents even when the window is unmapped would be > beneficial. ... While the server maintains contents, exposure > events will not normally be generated, but the server may stop > maintaining contents at any time." I vaguely remember seeing a discussion about this recently somewhere, but could someone throw some light on why setting backing store to "always" as opposed to "not useful" or "when mapped" breaks many clients written in the standard fashion. What seems to happen is that since the backing pixmap is created on window creation, then raising the window doesn't generate an expose, so the client never draws anything to the window. In other words, the server seems to go to extremes in avoiding sending expose events to the client, to the point where it is not initialising the backing pixmap ! This seems like a bug in the server backing store code. Is this behavior supported so that a client that sees that backing store is always enabled can assume it will never get an expose event, and that it is ok to draw to the window prior to raising it ? This seems contrary to the quoted protocol section above. 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. Graeme Gill Labtam Australia Pty. Ltd. graeme@labtam.oz.au