mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
XMonad.Layout.MultiToggle: let runLayout modify the base layout if no transformer is active
This commit is contained in:
parent
920336e1ac
commit
f15334d02d
@ -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
|
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
|
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
|
handleMessage mt m
|
||||||
| Just (Toggle t) <- fromMessage m
|
| Just (Toggle t) <- fromMessage m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user