diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2014-05-02 19:59:10 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2014-05-02 19:59:10 +0200 |
commit | b682eaf8fcbb548dacb35b4103e546cbd9fca3ed (patch) | |
tree | 5aedc6950c23f6ba76b44c9843f04909406cb843 | |
parent | 28e34818be10a8ab892458b62cf82d44621cf17c (diff) | |
download | xmonad-b682eaf8fcbb548dacb35b4103e546cbd9fca3ed.tar.gz xmonad-b682eaf8fcbb548dacb35b4103e546cbd9fca3ed.tar.xz xmonad-b682eaf8fcbb548dacb35b4103e546cbd9fca3ed.zip |
hack to avoid crash when fewer workspaces than screens (#543)
Ignore-this: 1bb0392eaed1e5b5437afff658960e95
darcs-hash:20140502175910-1499c-94908a88f9d05ed9fcd0e82efd678b2ed63d4667.gz
-rw-r--r-- | src/XMonad/Main.hsc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/XMonad/Main.hsc b/src/XMonad/Main.hsc index 5d59042..4be4ac6 100644 --- a/src/XMonad/Main.hsc +++ b/src/XMonad/Main.hsc @@ -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 |