diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-06-04 08:26:53 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-06-04 08:26:53 +0200 |
commit | 3988e0eaaed37cedfdb7b09119ca93667c837072 (patch) | |
tree | ac3b4116eda5fab87787cf0db1b36ea294111046 | |
parent | 955ca52cb22e386c8d1462c3fb5e88d089da86c2 (diff) | |
download | metatile-3988e0eaaed37cedfdb7b09119ca93667c837072.tar metatile-3988e0eaaed37cedfdb7b09119ca93667c837072.zip |
Use the new integrate function
darcs-hash:20070604062653-a5988-8a6456ccc1dd03fa1c733e71dfa056dd76a91186
-rw-r--r-- | Operations.hs | 4 | ||||
-rw-r--r-- | StackSet.hs | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Operations.hs b/Operations.hs index 59f3f7e..469f153 100644 --- a/Operations.hs +++ b/Operations.hs @@ -122,7 +122,7 @@ windows f = do -- We now go to some effort to compute the minimal set of windows to hide. -- The minimal set being only those windows which weren't previously hidden, -- which is the intersection of previously visible windows with those now hidden - mapM_ hide . concatMap (integrate . W.stack) $ + mapM_ hide . concatMap (W.integrate . W.stack) $ intersectBy (\w x -> W.tag w == W.tag x) (map W.workspace $ W.current old : W.visible old) (W.hidden new) @@ -130,8 +130,6 @@ windows f = do clearEnterEvents -- TODO: move this into StackSet. This isn't exactly the usual integrate. - where integrate W.Empty = [] - integrate (W.Node x l r) = x : l ++ r -- | setWMState. set the WM_STATE property setWMState :: Window -> Int -> X () diff --git a/StackSet.hs b/StackSet.hs index 1f6db7e..48dff02 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -257,7 +257,7 @@ integrate (Node x l r) = reverse l ++ x : r -- integration of a one-hole list cursor, back to a list. -- index :: Eq a => StackSet i a s -> [a] -index = with [] $ \(Node t l r) -> reverse l ++ t : r +index = with [] integrate -- let is = t : r ++ reverse l in take (length is) (dropWhile (/= m) (cycle is)) |