aboutsummaryrefslogtreecommitdiffstats
path: root/Combo.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-08-13 16:35:00 +0200
committerDavid Roundy <droundy@darcs.net>2007-08-13 16:35:00 +0200
commitecb2dbe7af23578144a8db0def9a674c8517e4f4 (patch)
treefd29d1dc1462ab3c9d042b17674428a721c229c3 /Combo.hs
parent804156556be3bb29b589fb925fb6f6e5db6a6389 (diff)
downloadXMonadContrib-ecb2dbe7af23578144a8db0def9a674c8517e4f4.tar.gz
XMonadContrib-ecb2dbe7af23578144a8db0def9a674c8517e4f4.tar.xz
XMonadContrib-ecb2dbe7af23578144a8db0def9a674c8517e4f4.zip
fix bug in Combo where we ignored changes in super.
darcs-hash:20070813143500-72aca-d8723648629f37b6a93e210a361b7da1cdc9123f.gz
Diffstat (limited to 'Combo.hs')
-rw-r--r--Combo.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Combo.hs b/Combo.hs
index ccb956d..da9070f 100644
--- a/Combo.hs
+++ b/Combo.hs
@@ -48,9 +48,9 @@ combo super origls = Layout { doLayout = \r s -> arrange r (integrate s), modify
where arrange _ [] = return ([], Nothing)
arrange r [w] = return ([(w,r)], Nothing)
arrange rinput origws =
- do lrs <- fst `fmap`
- runLayout super rinput (differentiate $ take (length origws) origls)
- let lwrs [] _ = []
+ do (lrs, msuper') <- runLayout super rinput (differentiate $ take (length origws) origls)
+ let super' = maybe super id msuper'
+ lwrs [] _ = []
lwrs [((l,_),r)] ws = [((l,r),differentiate ws)]
lwrs (((l,n),r):xs) ws = ((l,r),differentiate $ take len1 ws) : lwrs xs (drop len1 ws)
where len1 = min n (length ws - length xs)
@@ -58,7 +58,7 @@ combo super origls = Layout { doLayout = \r s -> arrange r (integrate s), modify
let origls' = zipWith foo (out++repeat ([],Nothing)) origls
foo (_, Nothing) x = x
foo (_, Just l') (_, n) = (l', n)
- return (concat $ map fst out, Just $ combo super origls')
+ return (concat $ map fst out, Just $ combo super' origls')
message m = do mls <- broadcastPrivate m (map fst origls)
let mls' = (\x->zipWith first (map const x) origls) `fmap` mls
msuper <- broadcastPrivate m [super]