From 5b698ebaaca14a67e705aedae9550f691feafadc Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Fri, 28 Mar 2008 20:09:03 +0100 Subject: XMonad.Layout.MultiToggle: let runLayout modify the base layout if no transformer is active darcs-hash:20080328190903-462cf-1beba98a60b585ea2ef7a74dbcc1e83d75f67c89.gz --- XMonad/Layout/MultiToggle.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'XMonad/Layout/MultiToggle.hs') 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 -- cgit v1.2.3