diff options
author | Lukas Mai <l.mai@web.de> | 2008-03-28 20:09:03 +0100 |
---|---|---|
committer | Lukas Mai <l.mai@web.de> | 2008-03-28 20:09:03 +0100 |
commit | 5b698ebaaca14a67e705aedae9550f691feafadc (patch) | |
tree | 2a11453aedd33f58248f0e61ebaee83c2c2b1844 | |
parent | 01fe604412ab3ecd9d2b8c47c356448799e3d8e5 (diff) | |
download | XMonadContrib-5b698ebaaca14a67e705aedae9550f691feafadc.tar.gz XMonadContrib-5b698ebaaca14a67e705aedae9550f691feafadc.tar.xz XMonadContrib-5b698ebaaca14a67e705aedae9550f691feafadc.zip |
XMonad.Layout.MultiToggle: let runLayout modify the base layout if no transformer is active
darcs-hash:20080328190903-462cf-1beba98a60b585ea2ef7a74dbcc1e83d75f67c89.gz
-rw-r--r-- | XMonad/Layout/MultiToggle.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/XMonad/Layout/MultiToggle.hs b/XMonad/Layout/MultiToggle.hs index 5c47d19..91ae18c 100644 --- a/XMonad/Layout/MultiToggle.hs +++ b/XMonad/Layout/MultiToggle.hs @@ -198,7 +198,11 @@ acceptChange mt f = fmap (f (\x -> mt{ currLayout = EL x })) instance (Typeable a, Show ts, HList ts a, LayoutClass l a) => LayoutClass (MultiToggle ts l) a where description mt = currLayout mt `unEL` \l -> description l - runLayout (Workspace i mt s) r = currLayout mt `unEL` \l -> acceptChange mt (fmap . fmap) (runLayout (Workspace i l s) r) + runLayout (Workspace i mt s) r + | isNothing (currIndex mt) = + acceptChange mt (fmap . fmap . \f x -> (f x){ baseLayout = x }) $ runLayout (Workspace i (baseLayout mt) s) r + | otherwise = currLayout mt `unEL` \l -> + acceptChange mt (fmap . fmap) $ runLayout (Workspace i l s) r handleMessage mt m | Just (Toggle t) <- fromMessage m |