This adds some type safety, since the super-layout is now of a distinct
type from the sublayouts. This avoids the ugliness we had, of passing
"fake" windows to the super layout. Now we directly lay out the layouts.
This modifies all the contrib modules to work (so far as I know) with the
new contrib layout. The exception is the LayoutHooks module, which isn't
used. It exports an API that is inherently unsafe, so far as I can tell
(and always has been).
WARNING! This change will break existing Tabbed configurations. The
problem is that there is no way within a Layout's "doLayout" to safely
modify the layout itself. This makes LayoutHooks fragile, and more to the
point, makes SimpleStacking fragile, so we can't safely define a
tabbed' = simpleStacking . tabbed
A workaround would have been to duplicate the tabbed code, but I'd rather
leave the ugliness and get this fixed.
Also uses fmap/maybe instead of do/case, which makes the code look a little
cleaner (imo).
Please note that I've only been able to test this briefly, but it seems to be
working like it's supposed to.
For some reason (not entirely clear to me) this doesn't work properly just
yet with the tabbed layout. :( But at least it'll compile. The trouble is
that we have no way of tracking which tab ought to be visible without
adding a *lot* of infrastructure. I'd rather have that infrastructure in
xmonad proper than reimplement all the focus-handling in combo, so for now
I'll just delay upgrading my xmonad at work...