aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2007-09-29 01:28:39 +0200
committerDon Stewart <dons@galois.com>2007-09-29 01:28:39 +0200
commit894f2ddf28e2540e62c529c9955660d131f47594 (patch)
tree57bfd0f3a2bec8613767b035cd90efaec6d48095
parentdbd3f627bab8cf6432d02484950557e70b5cdd41 (diff)
downloadxmonad-894f2ddf28e2540e62c529c9955660d131f47594.tar.gz
xmonad-894f2ddf28e2540e62c529c9955660d131f47594.tar.xz
xmonad-894f2ddf28e2540e62c529c9955660d131f47594.zip
polish
darcs-hash:20070928232839-cba2c-133f82c6199a6b1a065b3a013d9c4f2b5e9a253c.gz
Diffstat (limited to '')
-rw-r--r--StackSet.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 005669e..4660b80 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -33,7 +33,10 @@ module StackSet (
swapUp, swapDown, swapMaster, modify, modify', float, sink, -- needed by users
-- * Composite operations
-- $composite
- shift, shiftWin
+ shift, shiftWin,
+
+ -- for testing
+ abort
) where
import Prelude hiding (filter)
@@ -232,19 +235,20 @@ view i s
| Just x <- L.find ((i==).tag.workspace) (visible s)
-- if it is visible, it is just raised
- = s { current = x, visible = current s : L.deleteBy screenEq x (visible s) }
+ = s { current = x, visible = current s : L.deleteBy (equating screen) x (visible s) }
| Just x <- L.find ((i==).tag) (hidden s)
-- if it was hidden, it is raised on the xine screen currently used
= s { current = (current s) { workspace = x }
- , hidden = workspace (current s) : L.deleteBy tagEq x (hidden s) }
+ , hidden = workspace (current s) : L.deleteBy (equating tag) x (hidden s) }
- | otherwise = s
- where screenEq x y = screen x == screen y
- tagEq x y = tag x == tag y
+ | otherwise = s -- can't happen?
+ where equating f = \x y -> f x == f y
-- 'Catch'ing this might be hard. Relies on monotonically increasing
-- workspace tags defined in 'new'
+ --
+ -- and now tags are not monotonic, what happens here?
-- |
-- Set focus to the given workspace. If that workspace does not exist