diff options
-rw-r--r-- | XMonad/StackSet.hs | 5 |
1 files 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" |