summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/XMonad.hs b/XMonad.hs
index e611c31..103639e 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -148,10 +148,8 @@ class (Show (layout a), Read (layout a)) => Layout layout a where
modifyLayout :: layout a -> SomeMessage -> X (Maybe (layout a))
instance Layout SomeLayout a where
- doLayout (SomeLayout l) r s = do (ars, ml') <- doLayout l r s
- return (ars, SomeLayout `fmap` ml' )
- modifyLayout (SomeLayout l) m = do ml' <- modifyLayout l m
- return (SomeLayout `fmap` ml')
+ doLayout (SomeLayout l) r s = fmap (fmap $ fmap SomeLayout) $ doLayout l r s
+ modifyLayout (SomeLayout l) = fmap (fmap SomeLayout) . modifyLayout l
runLayout :: Layout l a => l a -> Rectangle -> StackOrNot a -> X ([(a, Rectangle)], Maybe (l a))
runLayout l r = maybe (return ([], Nothing)) (doLayout l r)