mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-26 09:41:53 -07:00
Use the new integrate function
This commit is contained in:
@@ -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 ()
|
||||
|
@@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user