aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--XMonad/Layout/LayoutModifier.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/XMonad/Layout/LayoutModifier.hs b/XMonad/Layout/LayoutModifier.hs
index 96772e4..933b4e7 100644
--- a/XMonad/Layout/LayoutModifier.hs
+++ b/XMonad/Layout/LayoutModifier.hs
@@ -49,6 +49,9 @@ class (Show (m a), Read (m a)) => LayoutModifier m a where
pureModifier :: m a -> Rectangle -> Stack a -> [(a, Rectangle)]
-> ([(a, Rectangle)], Maybe (m a))
pureModifier _ _ _ wrs = (wrs, Nothing)
+ emptyLayoutMod :: m a -> Rectangle -> [(a, Rectangle)]
+ -> X ([(a, Rectangle)], Maybe (m a))
+ emptyLayoutMod _ _ _ = return ([], Nothing)
hook :: m a -> X ()
hook _ = return ()
unhook :: m a -> X ()
@@ -64,6 +67,13 @@ instance (LayoutModifier m a, LayoutClass l a) => LayoutClass (ModifiedLayout m
Just m' -> Just $ (ModifiedLayout m') $ maybe l id ml'
Nothing -> ModifiedLayout m `fmap` ml'
return (ws', ml'')
+ emptyLayout (ModifiedLayout m l) r =
+ do (ws, ml') <- emptyLayout l r
+ (ws',mm') <- emptyLayoutMod m r ws
+ let ml'' = case mm' of
+ Just m' -> Just $ (ModifiedLayout m') $ maybe l id ml'
+ Nothing -> ModifiedLayout m `fmap` ml'
+ return (ws', ml'')
handleMessage (ModifiedLayout m l) mess =
do mm' <- handleMessOrMaybeModifyIt m mess
ml' <- case mm' of