From 2b0315d9e0a9830aaa76798c9451154a16ceeab2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 10 Sep 2013 21:00:00 +0200 Subject: Fix initial workspace generation --- XMonad/StackSet.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/XMonad/StackSet.hs b/XMonad/StackSet.hs index dd91c15..958b94b 100644 --- a/XMonad/StackSet.hs +++ b/XMonad/StackSet.hs @@ -194,8 +194,9 @@ abort x = error $ "xmonad: StackSet: " ++ x new :: (Integral s) => l -> [i] -> [sd] -> StackSet i l a s sd new l wids m | not (null wids) && length m <= length wids && not (null m) = StackSet cur visi - where (seen,_) = L.splitAt (length m) $ map (\i -> Workspace i l Nothing) wids - (cur:visi) = [ Screen i [] s sd | (i, s, sd) <- zip3 seen [0..] m ] + where (seen,unseen) = L.splitAt (length m) $ map (\i -> Workspace i l Nothing) wids + cur = Screen (head seen) unseen 0 (head m) + visi = [ Screen i [] s sd | (i, s, sd) <- zip3 (tail seen) [1..] (tail m) ] -- now zip up visibles with their screen id new _ _ _ = abort "non-positive argument to StackSet.new" -- cgit v1.2.3