
On Tue, Feb 12, 2008 at 06:17:55PM -0500, David Roundy wrote:
This one breaks Tabbed.addTabs:
How does it do so? What happens that is wrong?
My use of the word "broken" is confusing. Sorry for that. Nothing wrong is happening. What I meant is that addTabs is going to work *only* with Simplest at the present time, because Simplest is the only one in which 2 windows may be stacked.
Tue Feb 5 21:23:43 CET 2008 David Roundy
* make tabbed work nicely with LayoutCombinators and WindowNavigation. The problem is that WindowNavigation assumes all windows are navigable, and it was getting confused by decorations. With a bit of work, we can decorate windows *after* combining layouts just fine. I'm not clear what the problem is here. The theory of addTabbed was that the tabbed decoration should be able to decorate a "mixed" layout, in which some of the windows are supposed to be tabbed, and others are not (and those don't get decorated). If it doesn't do this, then yes, it's broken.
It does so, and so it is not broken. My fault, since I thought it was just more general, and could be used for, say, Circle, or Mirror tiled. At first Layout.Tabbed.hs was exporting a style that could be used with any layout, not just with layouts with stacked windows.
It also assumes the decoration to have the same y coordinate of the window to be decorated - the window must be shrunk. That is to say, if we were to remove the first constraint, we would end up with a SimpleDecoration layout modifier. :)
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.
Now I think I get exactly the problem your patch was trying to solve. What I want is to have a tabbed-like (let's call it this way) that can be used with any layout. For instance, a tabbed-like decoration that works with a floating layout: http://code.haskell.org/~arossato/xmonadShots/floatSimpleTabbed.png (Actually I'm not using such a layout, but I had a request for something like this). What I was asking was that: 1. can I change Layout.Tabbed.TabbedDecoration so that something like this can be done with that style without breaking WindowNavigation - and possibly other things? If yes, do I need to change WidowNavigation? If this is another yes, how? 2. Suppose that Layout.Tabbed.TabbedDecoration is not to be changed (because we need a style like that in order to get a properly working (real) tabbed layout). Now, if I write a TabbedLikeDecoration style, which will place decorations on the top of the screen, is that going to break WindowNavigation? May I change WindowNavigation to allow such a style to be used with it? (Note that I followed option 2. for DecorationMadness, but without exporting this TabbedLikeDecoration style).
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).
This means that both option 1 and option 2 would work fine with WindowNavigation, without any change?
It's better *not* to use isDecoration, on the principle that we should be checking for the actual property that we require (presense in the stack), not for a different property that happens to be true for the same windows.
This is an interesting point. Probably I should just change isDecoration to use the stack, right?
I haven't upgraded my xmonad since I wrote these patches, and doubt I'll upgrade any time soon (there's always the possibility when upgrading that I'll lose a half-day of work getting thing going again like they were before...), but my feeling is that tabbed and WindowNavigation aren't very broken (unless they've gotten more broken).
I hope I clarified that both tabbed and WindowNavigation are *not* broken. But I don't want to break them with the style I need (the TabbedLikeDecoration style) Thanks for you help. Andrea