aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorNorbert Zeh <nzeh@cs.dal.ca>2011-09-20 10:39:22 +0200
committerNorbert Zeh <nzeh@cs.dal.ca>2011-09-20 10:39:22 +0200
commit7dfb6a88238429a661ef1ec724eb6f08c78d1434 (patch)
tree38004d5c8e3031fbd3d3ccf60d6af135111a8b8f /XMonad
parentb6bd9dd5dfad0fae58d4f516a3bb14872014861e (diff)
downloadXMonadContrib-7dfb6a88238429a661ef1ec724eb6f08c78d1434.tar.gz
XMonadContrib-7dfb6a88238429a661ef1ec724eb6f08c78d1434.tar.xz
XMonadContrib-7dfb6a88238429a661ef1ec724eb6f08c78d1434.zip
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
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Actions/GroupNavigation.hs9
1 files changed, 2 insertions, 7 deletions
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)