[comp.windows.x] BackingStore Always

graeme@krite.labtam.oz (Graeme Gill) (03/07/91)

In article <9103051609.AA02015@devnull.Eng.Sun.COM>, dshr@eng.sun.COM (David Rosenthal) writes:
> 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.

	The problem was that our server is capable of setting BackingStore
to Always as a default. (Setting the default to something other than NotUseful
is a way of invoking backing store for clients that do not set the attribute
themselves)

	It seems to me that there is the possibility of others being
confused by this if they created a window with this attribute. The Xlib
Programming Manual (Second Edition) page 94 says about attributes:

	"A second group is provided to allow clients to improve their
	redrawing performance under certain conditions. These are backing_pixel,
	backing_planes, backing_store, bit gravity and save_under. These
	attributes do not affect the appearance or operation of a client."

	It appears that the operation of the client will be affected unless
Exposure events are solicited from the window before BackingStore Always is
selected.

	Graeme Gill
	Labtam Australia Pty. Ltd.
	graeme@labtam.oz.au

dshr@eng.sun.COM (David Rosenthal) (03/07/91)

> 	The problem was that our server is capable of setting BackingStore
> to Always as a default. (Setting the default to something other than NotUseful
> is a way of invoking backing store for clients that do not set the attribute
> themselves)
> 
Forcing backing-store=Always on clients which did not request it
is *not* permissible behaviour from an X server.  As Bob Scheifler
wrote recently:

> Note that if you
> mean you are using some kind of server config option to force Always on
> unsuspecting clients, this is contrary to the specification, so you
> shouldn't be surprised if clients break.  WhenMapped is the strongest
> implicit default you can force on clients.
> 
Caveat emptor.

	David.