summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-09-10 21:00:00 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-09-10 21:00:00 +0200
commit2b0315d9e0a9830aaa76798c9451154a16ceeab2 (patch)
tree8ddbfe13c8117e3fc01e02aef0f8050d1aa8edad
parent5311de16a9e5032d0b47939bc36b9b39690a8920 (diff)
downloadmetatile-2b0315d9e0a9830aaa76798c9451154a16ceeab2.tar
metatile-2b0315d9e0a9830aaa76798c9451154a16ceeab2.zip
Fix initial workspace generation
-rw-r--r--XMonad/StackSet.hs5
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"