darcs patch: Decoratione: generate rectangles first, and create win...

Hi,
the patch description says it all. Before pushing I would like someone
to test it too (I did all my tests here, with the strangest layouts,
still I would like to have someone confirm this patch doesn't break
anything).
The fact of creating the rectangle first means that the decoration
state is now:
[(Window,Rectangle),(Maybe Window, Maybe Rectangle)]
(the maybe stuff being decorations).
As a benefit, now we create only decorations for windows that actually
need a decoration. This is needed to let Decoration decorate decorated
layouts more efficiently: with the previous approach decorating a
decorated layout would mean creating decorations for decorations too,
and, since decorations wouldn't get e Rectangle, they were hidden at a
later time.
(I hope my description is clear...;)
Andrea
Tue Feb 19 13:21:15 CET 2008 Andrea Rossato

On Tue, Feb 19, 2008 at 01:30:53PM +0100, Andrea Rossato wrote:
the patch description says it all. Before pushing I would like someone to test it too (I did all my tests here, with the strangest layouts, still I would like to have someone confirm this patch doesn't break anything).
I've just pushed this patch together witha long comment only one, in order to give a detailed description of the code. I hope that style developers will find the haddock stuff enough: http://gorgias.mine.nu/xmonad-docs/xmonad-contrib/XMonad-Layout-Decoration.h... I've also commented non exported stuff too, in the hope to make Decoration a bit more hacker-friendly. Cheers, Andrea

* Andrea Rossato
the patch description says it all. Before pushing I would like someone to test it too (I did all my tests here, with the strangest layouts, still I would like to have someone confirm this patch doesn't break anything).
Works for me. Andrea, is it possible to have tabs (simpleDeco) as long (wide) as the window itself? -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

On Wed, Feb 20, 2008 at 05:29:22AM +0200, Roman Cheplyaka wrote:
Andrea, is it possible to have tabs (simpleDeco) as long (wide) as the window itself?
I think you mean something like this, right? http://code.haskell.org/~arossato/xmonadShots/floatSimpleDefault.png This is the DefaultDecoration. Check out Layout.DecorationMadness to see a few usage examples. (If I didn't get what you mean, can you please elaborate a bit) Cheers, Andrea

* Andrea Rossato
On Wed, Feb 20, 2008 at 05:29:22AM +0200, Roman Cheplyaka wrote:
Andrea, is it possible to have tabs (simpleDeco) as long (wide) as the window itself?
I think you mean something like this, right? http://code.haskell.org/~arossato/xmonadShots/floatSimpleDefault.png
This is the DefaultDecoration. Check out Layout.DecorationMadness to see a few usage examples.
Exactly, thanks! -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

* Roman Cheplyaka
* Andrea Rossato
[2008-02-19 13:30:53+0100] the patch description says it all. Before pushing I would like someone to test it too (I did all my tests here, with the strangest layouts, still I would like to have someone confirm this patch doesn't break anything).
Works for me.
Oops, it doesn't. In tabbed layout, when I open sequentially two windows, only second gets its tab (which is of the right size), and the place where the first window's tab should be is empty (I can see a part of the first window through it). My config: http://ro-che.info/docs/xmonad.hs Unpulling your four last patches solves this problem. -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

On Wed, Feb 20, 2008 at 04:28:07PM +0200, Roman Cheplyaka wrote:
* Roman Cheplyaka
[2008-02-20 05:29:22+0200] * Andrea Rossato
[2008-02-19 13:30:53+0100] the patch description says it all. Before pushing I would like someone to test it too (I did all my tests here, with the strangest layouts, still I would like to have someone confirm this patch doesn't break anything).
Works for me.
Oops, it doesn't. In tabbed layout, when I open sequentially two windows, only second gets its tab (which is of the right size), and the place where the first window's tab should be is empty (I can see a part of the first window through it). My config: http://ro-che.info/docs/xmonad.hs Unpulling your four last patches solves this problem.
I'm not totally sure this is a bug in Decoration. I'm coming to think this is a bug in the TabbedDecoratios style. I have the same problem, here, when I use smartBorders. Still, if I change your config by adding these imports: import XMonad.Layout.TabBarDecoration import XMonad.Layout.Simplest import XMonad.Layout.ResizeScreen and change your tabbed with the tabbed-like decoration: tbd = tabBar shrinkText myTabConfig Top (resizeVertical 20 Simplest) your problem has gone. So, I think, but I need to investigate a bit further, my patches have just revealed a bug in the tabbed style. But I may be wrong. (Please tell me if the above solves your problem too). Andrea

* Andrea Rossato
On Wed, Feb 20, 2008 at 04:28:07PM +0200, Roman Cheplyaka wrote:
* Roman Cheplyaka
[2008-02-20 05:29:22+0200] * Andrea Rossato
[2008-02-19 13:30:53+0100] the patch description says it all. Before pushing I would like someone to test it too (I did all my tests here, with the strangest layouts, still I would like to have someone confirm this patch doesn't break anything).
Works for me.
Oops, it doesn't. In tabbed layout, when I open sequentially two windows, only second gets its tab (which is of the right size), and the place where the first window's tab should be is empty (I can see a part of the first window through it). My config: http://ro-che.info/docs/xmonad.hs Unpulling your four last patches solves this problem.
I'm not totally sure this is a bug in Decoration. I'm coming to think this is a bug in the TabbedDecoratios style. I have the same problem, here, when I use smartBorders.
Still, if I change your config by adding these imports:
import XMonad.Layout.TabBarDecoration import XMonad.Layout.Simplest import XMonad.Layout.ResizeScreen
and change your tabbed with the tabbed-like decoration:
tbd = tabBar shrinkText myTabConfig Top (resizeVertical 20 Simplest)
your problem has gone.
So, I think, but I need to investigate a bit further, my patches have just revealed a bug in the tabbed style. But I may be wrong.
(Please tell me if the above solves your problem too).
Yes, it does. -- Roman I. Cheplyaka (aka Feuerbach @ IRC)

* Andrea Rossato
On Wed, Feb 20, 2008 at 04:28:07PM +0200, Roman Cheplyaka wrote:
* Roman Cheplyaka
[2008-02-20 05:29:22+0200] * Andrea Rossato
[2008-02-19 13:30:53+0100] the patch description says it all. Before pushing I would like someone to test it too (I did all my tests here, with the strangest layouts, still I would like to have someone confirm this patch doesn't break anything).
Works for me.
Oops, it doesn't. In tabbed layout, when I open sequentially two windows, only second gets its tab (which is of the right size), and the place where the first window's tab should be is empty (I can see a part of the first window through it). My config: http://ro-che.info/docs/xmonad.hs Unpulling your four last patches solves this problem.
I'm not totally sure this is a bug in Decoration. I'm coming to think this is a bug in the TabbedDecoratios style. I have the same problem, here, when I use smartBorders.
Still, if I change your config by adding these imports:
import XMonad.Layout.TabBarDecoration import XMonad.Layout.Simplest import XMonad.Layout.ResizeScreen
and change your tabbed with the tabbed-like decoration:
tbd = tabBar shrinkText myTabConfig Top (resizeVertical 20 Simplest)
your problem has gone.
So, I think, but I need to investigate a bit further, my patches have just revealed a bug in the tabbed style. But I may be wrong.
(Please tell me if the above solves your problem too).
However, with your modification single window also has tab, and in Tabbed it doesn't. Maybe this toggles the bug (first window's tab doesn't appear when the second window opens). -- Roman I. Cheplyaka :: http://ro-che.info/ ...being in love is totally punk rock...

On Wed, Feb 20, 2008 at 06:24:08PM +0200, Roman Cheplyaka wrote:
However, with your modification single window also has tab, and in Tabbed it doesn't. Maybe this toggles the bug (first window's tab doesn't appear when the second window opens).
Decoration derives from Tabbed. When I made it a layout modifier it was creating a decoration window for every (Window,Rectangle) returned by the underlying layout. Then the DecorationStyle class method 'decorate' was going to be called, and if it returned a Just Rectangle that window was going to be shown, otherwise it was going to be hidden. Yesterday patches changed all that: now 'decorate' is called and if it returns a Just Rectangle we create a window, while if it returns Nothing we do not. The problem is that I forgot to write the code for what reasonably follows from that. That is to say: if in a successive call 'decorate' is going to change its mind and return a Just Rectangle, we must create a window. And this was not going to happen. And this was visible only with David's TabbedDecoration style, and only if you were starting to use it without any windows (that is to say, if you started that layout in an empty workspace, and I must confess I've never tried that). (btw: I had some notes in my source to write that part too, but I didn't realize it was necessary till this afternoon, and thanks to Roman!) Andrea ps: obviously I wrote this message to inform you that I pushed the fix.

On Wed, Feb 20, 2008 at 05:04:09PM +0100, Andrea Rossato wrote:
So, I think, but I need to investigate a bit further, my patches have just revealed a bug in the tabbed style. But I may be wrong.
I was wrong. I found the bug, but I'm still thinking about the best way to solve it. A patch should be due in a few hours. Thanks for reporting it and for your help (I know that pulling, unrecording, reverting, etc, takes time...;). Cheers, Andrea
participants (2)
-
Andrea Rossato
-
Roman Cheplyaka