
I also have some more general thoughts your mail generated. On Tue, Feb 12, 2008 at 06:17:55PM -0500, David Roundy wrote:
I'm a little unclear here: what is it that you want tabbed to do? I had to make this change (I think) in order to make tabbed work properly when it is placed in a subset of the screen. Your tabbed was trying to draw the tabs at the top of the screen regardless, as I recall. Certainly we must use the locations of the windows to determine the locations of the tabs, otherwise everythings going to look crazy.
There are cases in which the window's location cannot be used, such as the case of a floating layout with a tabbed-like decoration. I think that in such cases we must use the screen rectangle a layout (or a layout modifier) gets in doLayout/redoLayout. LayoutModifier has the modifyLayout method for this purpose only: change the rectangle (or the stack, which is quite uncommon - no one is doing so right now) and produce the (window,rectangle) list accordingly. But probably this is incompatible with what comes next.
But, as far as I understand, this is needed for WindowNavigation (I do not understand well its code, and I didn't have time to study it).
No, this bit is no longer needed for WindowNavigation. It is, however, needed if you want to apply this decoration to a more interesting layout than Simplest. (Which was required by WindowNavigation, prior to the patch mentioned below.) I do think this is a good idea, as it gives us a more composable interface (i.e. we could combine layouts *prior* to adding decorations, which might have advantages).
Applying decorations after combining layouts is definitely something *very* good. I'm wondering if this is compatible with the above. (Probably not?) (And so, this would answer also my previous mail, probably: a TabbedLikeDecoration style is *incompatible* with the possibility of decorating layouts after combining them). What I'm asking is this: if there is this incompatibility, should we enforce it in the DecorationStyle class (which would mean, remove the screen rectangle from the decorate method) or just warn the user that a given style cannot be used for combined layouts? Thanks for you kind attention. Andrea