From bc18cae746b38dcb31b39f46b20a3a6bdd727206 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 25 Sep 2007 23:58:16 +0200 Subject: fix bug where ReleaseResources wasn't getting sent to all layouts. darcs-hash:20070925215816-72aca-cb4cadda15649f4f8556532ca080b153c5381429 --- Operations.hs | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3