aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-05-03 23:40:07 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-05-03 23:40:07 +0200
commit4b7e058fb78a7856534c712c913ed2cb515d4025 (patch)
tree4a187467ce061a4453cf5dc27bdb58e611e635ff
parent3a7af24ccb821b88613736f2f3d5ff049cfac02b (diff)
downloadxmonad-4b7e058fb78a7856534c712c913ed2cb515d4025.tar.gz
xmonad-4b7e058fb78a7856534c712c913ed2cb515d4025.tar.xz
xmonad-4b7e058fb78a7856534c712c913ed2cb515d4025.zip
Avoid the unsafe pattern match, in case Config.hs has no layouts
darcs-hash:20070503214007-a5988-f427a9747f76859219abf029c2f550e7dbec258f.gz
-rw-r--r--Operations.hs2
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