From 7dfb6a88238429a661ef1ec724eb6f08c78d1434 Mon Sep 17 00:00:00 2001 From: Norbert Zeh Date: Tue, 20 Sep 2011 10:39:22 +0200 Subject: Remove X.A.GroupNavigation.currentWindow Ignore-this: 4b202a9c9e3a13c5e34862784ea4acfa This function does the same as X.StackSet.peek and all its uses have been replaced with X.StackSet.peek. darcs-hash:20110920083922-18a2b-617c85f913bacb3ad9239f0a6ee8afc1e4c28d41.gz --- XMonad/Actions/GroupNavigation.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'XMonad/Actions') diff --git a/XMonad/Actions/GroupNavigation.hs b/XMonad/Actions/GroupNavigation.hs index 910e8ed..d9d7240 100644 --- a/XMonad/Actions/GroupNavigation.hs +++ b/XMonad/Actions/GroupNavigation.hs @@ -129,18 +129,13 @@ orderedWindowList dir = withWindowSet $ \ss -> do wins = dirfun dir $ Fold.foldl' (><) Seq.empty $ fmap (Seq.fromList . SS.integrate' . SS.stack) wspcs - cur = currentWindow ss + cur = SS.peek ss return $ maybe wins (rotfun wins) cur where dirfun Backward = Seq.reverse dirfun _ = id rotfun wins x = rotate $ rotateTo (== x) wins --- Returns the currently focused window or Nothing if no window is --- currently focused. -currentWindow :: WindowSet -> Maybe Window -currentWindow = liftM SS.focus . SS.stack . SS.workspace . SS.current - -- Returns the ordered workspace list as specified in ~/.xmonad/xmonad.hs orderedWorkspaceList :: WindowSet -> Seq String -> Seq WindowSpace orderedWorkspaceList ss wsids = rotateTo isCurWS wspcs' @@ -170,7 +165,7 @@ historyHook = XS.get >>= updateHistory >>= XS.put -- Updates the history in response to a WindowSet change updateHistory :: HistoryDB -> X HistoryDB updateHistory (HistoryDB oldcur oldhist) = withWindowSet $ \ss -> do - let newcur = currentWindow ss + let newcur = SS.peek ss wins = Set.fromList $ SS.allWindows ss newhist = flt (flip Set.member wins) (ins oldcur oldhist) return $ HistoryDB newcur (del newcur newhist) -- cgit v1.2.3