aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWouter Swierstra <wouter@chalmers.se>2009-05-03 17:43:21 +0200
committerWouter Swierstra <wouter@chalmers.se>2009-05-03 17:43:21 +0200
commit4da50560d56799e5052839e372460853b9d1b048 (patch)
tree75ab86d319fc49a0d6b449407aa6932f397fa8b7
parent51feef861b8b4a87c43e1218f7a101c14ff4991b (diff)
downloadxmonad-4da50560d56799e5052839e372460853b9d1b048.tar.gz
xmonad-4da50560d56799e5052839e372460853b9d1b048.tar.xz
xmonad-4da50560d56799e5052839e372460853b9d1b048.zip
Minor bugfix in the creation of new StackSets.
darcs-hash:20090503154321-72cfd-985afe234c939954d49603f010939c93c072d2e8.gz
-rw-r--r--XMonad/StackSet.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/XMonad/StackSet.hs b/XMonad/StackSet.hs
index 6cf43a5..98497cd 100644
--- a/XMonad/StackSet.hs
+++ b/XMonad/StackSet.hs
@@ -194,7 +194,8 @@ abort x = error $ "xmonad: StackSet: " ++ x
-- Xinerama: Virtual workspaces are assigned to physical screens, starting at 0.
--
new :: (Integral s) => l -> [i] -> [sd] -> StackSet i l a s sd
-new l wids m | not (null wids) && length m <= length wids = StackSet cur visi unseen M.empty
+new l wids m | not (null wids) && length m <= length wids && not (null m)
+ = StackSet cur visi unseen M.empty
where (seen,unseen) = L.splitAt (length m) $ map (\i -> Workspace i l Nothing) wids
(cur:visi) = [ Screen i s sd | (i, s, sd) <- zip3 seen [0..] m ]
-- now zip up visibles with their screen id