diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-05-03 23:40:07 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-05-03 23:40:07 +0200 |
commit | 9f69e8ec1244da90a8cf5ff7593c73015e692fde (patch) | |
tree | 4a187467ce061a4453cf5dc27bdb58e611e635ff | |
parent | 60ec8b60b2f772bf06bde0c5fc45aaedb77d0b71 (diff) | |
download | metatile-9f69e8ec1244da90a8cf5ff7593c73015e692fde.tar metatile-9f69e8ec1244da90a8cf5ff7593c73015e692fde.zip |
Avoid the unsafe pattern match, in case Config.hs has no layouts
darcs-hash:20070503214007-a5988-f427a9747f76859219abf029c2f550e7dbec258f
-rw-r--r-- | Operations.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs index 1fd3482..8df287d 100644 --- a/Operations.hs +++ b/Operations.hs @@ -48,7 +48,7 @@ refresh = do flip mapM_ (M.assocs (W.screen2ws ws)) $ \(scn, n) -> do let sc = genericIndex xinesc scn -- temporary coercion! - (l:_) = case M.findWithDefault defaultLayouts n fls of {[] -> defaultLayouts; l -> l} + l = fromMaybe full (do (x:_) <- M.lookup n fls; return x) mapM_ (\(w, rect) -> io $ moveWindowInside d w rect) $ (doLayout l) sc $ W.index n ws whenJust (W.peekStack n ws) (io . raiseWindow d) whenJust (W.peek ws) setFocus |