MultiToggle: fix to work with runLayout changes to core

This commit is contained in:
Brent Yorgey 2008-03-11 17:20:46 +00:00
parent 32941d49b4
commit 5769b3343b

View File

@ -29,6 +29,8 @@ module XMonad.Layout.MultiToggle (
import XMonad import XMonad
import XMonad.StackSet (Workspace(..))
import Control.Arrow import Control.Arrow
import Data.Typeable import Data.Typeable
import Data.Maybe import Data.Maybe
@ -196,11 +198,7 @@ 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
pureLayout mt r s = currLayout mt `unEL` \l -> pureLayout l r s runLayout (Workspace i mt s) r = currLayout mt `unEL` \l -> acceptChange mt (fmap . fmap) (runLayout (Workspace i l s) r)
doLayout mt r s = currLayout mt `unEL` \l -> acceptChange mt (fmap . fmap) (doLayout l r s)
emptyLayout mt r = currLayout mt `unEL` \l -> acceptChange mt (fmap . fmap) (emptyLayout l r)
handleMessage mt m handleMessage mt m
| Just (Toggle t) <- fromMessage m | Just (Toggle t) <- fromMessage m