diff options
author | Don Stewart <dons@galois.com> | 2007-09-29 01:28:39 +0200 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2007-09-29 01:28:39 +0200 |
commit | 6a5b153243ab3a2bec45ed772c2f16da5d00f185 (patch) | |
tree | 57bfd0f3a2bec8613767b035cd90efaec6d48095 | |
parent | bf9c44479939a9cdae8b1d8f18f818bec221bd2a (diff) | |
download | metatile-6a5b153243ab3a2bec45ed772c2f16da5d00f185.tar metatile-6a5b153243ab3a2bec45ed772c2f16da5d00f185.zip |
polish
darcs-hash:20070928232839-cba2c-133f82c6199a6b1a065b3a013d9c4f2b5e9a253c
-rw-r--r-- | StackSet.hs | 16 |
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 |