I was reading a book called Low Level X Window Programming
by Ross Maloney. He was talking about one of the key aspects of a stacked window system i.e restoration of "hidden" contents when you "remove" a window.
Normally you would expect the content "behind" to be immediately visible. However, apparently, this is not something that an x
implementation has to provide though some does.
The save under and backing store services differ slightly. In save under, the contents of the screen onto which a window is mapped is save by the server at the instance before the window is mapped, using the memory of the server.
- If this is not something that
x
server provides, should it be implemented in the client side? - How do some of the typical window manager implement stacking?
- If
xorg
does provide this feature, is there any specific algorithm that can be used especially for "save under"? I didn't understand how saving a copy of the overlapping area can be used later especially when you have multiple overlaps =) My mind is already blowing! Can such delta's be used to reconstruct the stack?
If not, does it repaint each of the stacked window one by one in case of a random window removal? Wikipedia says the following:
Stacking is a relatively slow process, requiring the redrawing of every window one-by-one, from the rear-most and outer-most to the front most and inner-most. Many stacking window managers don't always redraw background windows. Others can detect when a redraw of all windows is required, as some applications request stacking when their output has changed. Re-stacking is usually done through a function call to the window manager, which selectively redraws windows as needed. For example, if a background window is brought to the front, only that window should need to be redrawn.
PS: I know this is a big question, but it would be helpful to get some pointers.