diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2012-11-09 02:23:16 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2012-11-09 02:23:16 +0100 |
commit | fff5ddb53f4eda07c3cbd1caae236e5edd8ea4bc (patch) | |
tree | 9f158730016f24578b11960dee6a7dcb11961e38 /XMonad/Layout/WindowNavigation.hs | |
parent | f1c0b28a5c40186f8723772a9e30d1107a4c884b (diff) | |
download | XMonadContrib-fff5ddb53f4eda07c3cbd1caae236e5edd8ea4bc.tar.gz XMonadContrib-fff5ddb53f4eda07c3cbd1caae236e5edd8ea4bc.tar.xz XMonadContrib-fff5ddb53f4eda07c3cbd1caae236e5edd8ea4bc.zip |
Rename variables "state" to avoid warnings about shadowing
Ignore-this: cd063d632412f758ca9fed6393521c8f
XMonad core re-exports Control.Monad.State, which includes
a function "state" if you happen to use mtl-2. Since there's
a chance xmonad still works with mtl-1 avoid imports like:
import XMonad hiding (state)
darcs-hash:20121109012316-1499c-539514f4cd97ba8b18a8fbfd1a15333b46d962e1.gz
Diffstat (limited to 'XMonad/Layout/WindowNavigation.hs')
-rw-r--r-- | XMonad/Layout/WindowNavigation.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/XMonad/Layout/WindowNavigation.hs b/XMonad/Layout/WindowNavigation.hs index 5587b73..0244532 100644 --- a/XMonad/Layout/WindowNavigation.hs +++ b/XMonad/Layout/WindowNavigation.hs @@ -105,7 +105,7 @@ configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout W configurableNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing)) instance LayoutModifier WindowNavigation Window where - redoLayout (WindowNavigation conf (I state)) rscr (Just s) origwrs = + redoLayout (WindowNavigation conf (I st)) rscr (Just s) origwrs = do XConf { normalBorder = nbc, focusedBorder = fbc, display = dpy } <- ask [uc,dc,lc,rc] <- case brightness conf of @@ -120,8 +120,8 @@ instance LayoutModifier WindowNavigation Window where let w = W.focus s r = case filter ((==w).fst) origwrs of ((_,x):_) -> x [] -> rscr - pt = case state of Just (NS ptold _) | ptold `inrect` r -> ptold - _ -> center r + pt = case st of Just (NS ptold _) | ptold `inrect` r -> ptold + _ -> center r existing_wins = W.integrate s wrs = filter ((`elem` existing_wins) . fst) $ filter ((/=r) . snd) $ filter ((/=w) . fst) origwrs @@ -130,8 +130,8 @@ instance LayoutModifier WindowNavigation Window where wnavigablec = nub $ concatMap (\d -> map (\(win,_) -> (win,dirc d)) $ take 1 $ navigable d pt wrs) [U,D,R,L] - wothers = case state of Just (NS _ wo) -> map fst wo - _ -> [] + wothers = case st of Just (NS _ wo) -> map fst wo + _ -> [] mapM_ (sc nbc) (wothers \\ map fst wnavigable) mapM_ (\(win,c) -> sc c win) wnavigablec return (origwrs, Just $ WindowNavigation conf $ I $ Just $ NS pt wnavigable) |