Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!oliveb!amiga!boing!dale From: dale@boing.UUCP (Dale Luck) Newsgroups: comp.windows.x Subject: Re: Contents of windows Message-ID: <723@boing.UUCP> Date: 30 Apr 89 15:00:26 GMT References: <4009@ficc.uu.net> <8904281155.AA02450@expire.lcs.mit.edu> Reply-To: dale@boing.UUCP (Dale Luck) Organization: Boing, Milpitas, Ca. Lines: 49 In article <8904281155.AA02450@expire.lcs.mit.edu> rws@EXPO.LCS.MIT.EDU writes: > > That's an interesting comparison, since the Amiga windowing system does > guarantee a backing-store for all windows. If Intuition can do it, why > not X? > >How does Intuition do it? Does it pop up a message: "Please insert floppy >number 137, I need to save/retrieve some backing-store bits" ? They must be >trading off something somewhere. For example, do they guarantee backing-store >regardless of how big you later make the window? Does that mean they >preallocate max-sized memory chunks for every window created? The Amiga windowing system does guarentee that all bits are preserved. It is able to do this by not allowing operations that would irreversably lose those bits. If a window is placed such that it is behind another window and the bits need to be saved off screen it allocates them on the fly. If they cannot be allocated it backs out of the operation and returns an error that the window could not be moved. The important thing here is that it does not lose the contents of the window. The Amiga windowing system maintains several kinds of windows. Windows that do not need backing store (Simple), whose bits are never preserved when something covers them up on the shared bitmap; Windows that do need backing store (Smart), in which extra backing store is only allocated in case of occlusion; and also superbitmap windows, in which there is a complete bitmap/pixmap allocated for the window. Smart refresh windows lose there bits if they are sized down and sized back up, generating a refresh event. Simple windows always generate refresh events in the case of uncovering a portion on the display. Superbitmaps never generate refresh events. Is there a >small limit to the number of windows that can be created? Nope, depends on how much memory you have. > Or does the guarantee" mean the system will crash unexpectedly at some point? Give me a break, rws. Have you used the Amiga and seen it crash by just playing with the placement and geometry of the windows? The technology used by the layer library in the Amiga window system is setjmp/longjmp based. When operations occur that may require more memory to be consumed, they are done in a very careful order. For instance we allocate the new set of structures and associated bitmaps before freeing the original ones, etc. This allows the Amiga to back out of a partially completed operation and restore the state of the machine before the operation took place if a memory allocation fails. -- Dale Luck GfxBase/Boing, Inc. {uunet!cbmvax|pyramid}!amiga!boing!dale