[xmonad] Re: Segmentation fault when accidentally decorating a tabbed layout

Weeble clockworksaint at gmail.com
Wed Jun 9 19:20:46 EDT 2010


2010/6/9 Tomáš Janoušek <tomi at nomi.cz>:
> Did you xmonad --recompile? The attached xmonad.hs certainly doesn't compile
> without errors with latest xmonad and XMC, exactly because a fix for this
> problem introduced an API change in the Transformer class.

Ah, thanks. When does xmonad.hs normally get recompiled? I know I've
gotten configuration changes to work before without having run xmonad
--recompile, so I'm a bit confused now.

I got it to work by making this change, but I'm not really sure I
understand what it's doing. Is it right?

instance Transformer DECORATE Window where
     transform _ x k = k (simpleDeco shrinkText myTheme x) (const x)

I added the (const x) on the end there. I looked at the other examples
in MultiToggle/Instances.hs. I think that it should be a function that
takes the decorated layout and returns the undecorated version. Some
of the examples there use (const x) and some of them use a lambda with
a pattern-match on a layout constructor. I don't know if I could use a
pattern-match since simpleDeco is a function call. I don't know if I
need to either - it seems that (const x) works. Is it okay?


More information about the xmonad mailing list