aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2008-03-07 19:16:34 +0100
committerDon Stewart <dons@galois.com>2008-03-07 19:16:34 +0100
commitf8a11e8f42e7f80bc124ec4b040a31e161d39813 (patch)
treeef5faff4f08cac84c292696d91f571417d92a756 /XMonad
parent0cf32c618ce3510677e0ef0582b094eefcd9a2d1 (diff)
downloadxmonad-f8a11e8f42e7f80bc124ec4b040a31e161d39813.tar.gz
xmonad-f8a11e8f42e7f80bc124ec4b040a31e161d39813.tar.xz
xmonad-f8a11e8f42e7f80bc124ec4b040a31e161d39813.zip
rework failure cases in StackSet.view
darcs-hash:20080307181634-cba2c-66088abef9a3e448dd6043cf4aefa4eb275c5a44.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/StackSet.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/XMonad/StackSet.hs b/XMonad/StackSet.hs
index d9e7e6b..20cafe2 100644
--- a/XMonad/StackSet.hs
+++ b/XMonad/StackSet.hs
@@ -210,8 +210,7 @@ new _ _ _ = abort "non-positive argument to StackSet.new"
view :: (Eq s, Eq i) => i -> StackSet i l a s sd -> StackSet i l a s sd
view i s
- | not (i `tagMember` s)
- || i == tag (workspace (current s)) = s -- out of bounds or current
+ | i == tag (workspace (current s)) = s -- current
| Just x <- L.find ((i==).tag.workspace) (visible s)
-- if it is visible, it is just raised
@@ -222,7 +221,7 @@ view i s
= s { current = (current s) { workspace = x }
, hidden = workspace (current s) : L.deleteBy (equating tag) x (hidden s) }
- | otherwise = s -- can't happen: all workspaces are either invalid, current, visible, or hidden
+ | otherwise = s -- not a member of the stackset
where equating f = \x y -> f x == f y