diff options
author | David Roundy <droundy@darcs.net> | 2007-06-16 21:10:52 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-06-16 21:10:52 +0200 |
commit | a2a38d2897f8324d024d1f73e277133edfa00b91 (patch) | |
tree | b4e7c6f309fa6153ab06b2fe7cab29240db8d928 | |
parent | 9782aefe2447f52d2e45f42c0c2ae7dec55e8539 (diff) | |
download | XMonadContrib-a2a38d2897f8324d024d1f73e277133edfa00b91.tar.gz XMonadContrib-a2a38d2897f8324d024d1f73e277133edfa00b91.tar.xz XMonadContrib-a2a38d2897f8324d024d1f73e277133edfa00b91.zip |
fix leak in Combo.
We leaked decorations, since UnDoLayout wasn't passed to the actual layouts
that had decorations attached. :(
darcs-hash:20070616191052-72aca-9a2e2315e11257f5e5e35cd3944e2a4092919c74.gz
-rw-r--r-- | Combo.hs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -20,6 +20,7 @@ module XMonadContrib.Combo ( import XMonad import StackSet ( integrate, differentiate ) +import Operations ( UnDoLayout(UnDoLayout) ) -- $usage -- @@ -47,7 +48,15 @@ combo origls super = Layout { doLayout = \r s -> arrange r (integrate s), modify (map differentiate $ wss (take (length rs) $ map snd origls) origws) return $ concat out + message m | Just UnDoLayout <- fromMessage m = + do (super':ls') <- broadcastPrivate UnDoLayout (super:map fst origls) + return $ Just $ combo (zip ls' $ map snd origls) super' message m = do msuper' <- modifyLayout super m case msuper' of Nothing -> return Nothing Just super' -> return $ Just $ combo origls super' + +broadcastPrivate :: Message a => a -> [Layout] -> X [Layout] +broadcastPrivate a ol = mapM f ol + where f l = do ml' <- modifyLayout l (SomeMessage a) `catchX` return (Just l) + return $ maybe l id ml' |