hack to avoid crash when fewer workspaces than screens (#543)

This commit is contained in:
Adam Vogt 2014-05-02 17:59:10 +00:00
parent aa84841289
commit d67dcd8c4b

View File

@ -96,7 +96,8 @@ xmonad initxmc = do
let layout = layoutHook xmc
lreads = readsLayout layout
initialWinset = new layout (workspaces xmc) $ map SD xinesc
initialWinset = let padToLen n xs = take (max n (length xs)) $ xs ++ repeat ""
in new layout (padToLen (length xinesc) (workspaces xmc)) $ map SD xinesc
maybeRead reads' s = case reads' s of
[(x, "")] -> Just x
_ -> Nothing