summaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-09-25 23:58:16 +0200
committerDavid Roundy <droundy@darcs.net>2007-09-25 23:58:16 +0200
commitbc18cae746b38dcb31b39f46b20a3a6bdd727206 (patch)
treec046fc9ee90591fdb2968ddb4e86c24a91f578ad /Operations.hs
parent3e949bb931cd91d9558a58f37ce389a2bd676ee6 (diff)
downloadmetatile-bc18cae746b38dcb31b39f46b20a3a6bdd727206.tar
metatile-bc18cae746b38dcb31b39f46b20a3a6bdd727206.zip
fix bug where ReleaseResources wasn't getting sent to all layouts.
darcs-hash:20070925215816-72aca-cb4cadda15649f4f8556532ca080b153c5381429
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Operations.hs b/Operations.hs
index 1d3fed5..2a0559f 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -357,6 +357,10 @@ instance ReadableSomeLayout a => Layout LayoutSelection a where
| Just NextLayout <- fromMessage m = switchl rls
| Just PrevLayout <- fromMessage m = switchl rls'
| Just (JumpToLayout x) <- fromMessage m = switchl (j x)
+ | Just ReleaseResources <- fromMessage m =
+ do mlls' <- mapM (\ll -> handleMessage ll m) (l:ls)
+ let lls' = zipWith (\x mx -> maybe x id mx) (l:ls) mlls'
+ return $ Just $ LayoutSelection lls'
where rls (x:xs) = xs ++ [x]
rls [] = []
rls' = reverse . rls . reverse