From 2a59314ffa3997b6365bf2130ef8df0e0bc0185d Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Fri, 4 May 2007 06:56:44 +0200 Subject: Handle empty layout lists darcs-hash:20070504045644-a5988-68a6d650bacab936f893b96bf866696da3f73436.gz --- Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Main.hs') diff --git a/Main.hs b/Main.hs index 33812ef..ae0b596 100644 --- a/Main.hs +++ b/Main.hs @@ -45,7 +45,8 @@ main = do nbc <- initcolor normalBorderColor fbc <- initcolor focusedBorderColor - let cf = XConf + let safeLayouts = case defaultLayouts of [] -> (full, []); (x:xs) -> (x, xs) + cf = XConf { display = dpy , xineScreens = xinesc , theRoot = rootw @@ -59,7 +60,7 @@ main = do } st = XState { workspace = W.empty workspaces (length xinesc) - , layouts = M.empty + , layouts = M.fromList [(w, safeLayouts) | w <- [0 .. W workspaces - 1]] } xSetErrorHandler -- in C, I'm too lazy to write the binding -- cgit v1.2.3