From 9e48c4e3bccd18600007e9f50f784f7726a96a8f Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Mon, 4 Jun 2007 07:09:14 +0200 Subject: base >= 2.0 means we can use forM_ darcs-hash:20070604050914-a5988-600a4ba6f2f294b0ce56b16e8887d493789f29c7 --- Main.hs | 2 +- Operations.hs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Main.hs b/Main.hs index 490da13..61f8781 100644 --- a/Main.hs +++ b/Main.hs @@ -99,7 +99,7 @@ scan dpy rootw = do grabKeys :: Display -> Window -> IO () grabKeys dpy rootw = do ungrabKey dpy anyKey anyModifier rootw - flip mapM_ (M.keys keys) $ \(mask,sym) -> do + forM_ (M.keys keys) $ \(mask,sym) -> do kc <- keysymToKeycode dpy sym -- "If the specified KeySym is not defined for any KeyCode, -- XKeysymToKeycode() returns zero." diff --git a/Operations.hs b/Operations.hs index f419edf..3d2e4d1 100644 --- a/Operations.hs +++ b/Operations.hs @@ -160,7 +160,7 @@ refresh = do d <- asks display -- for each workspace, layout the currently visible workspaces - (`mapM_` (W.current ws : W.visible ws)) $ \w -> do + forM_ (W.current ws : W.visible ws) $ \w -> do let n = W.tag (W.workspace w) this = W.view n ws Just l = fmap fst $ M.lookup n fls @@ -177,7 +177,7 @@ refresh = do -- now the floating windows: -- move/resize the floating windows, if there are any - (`mapM_` flt) $ \fw -> whenJust (M.lookup fw (W.floating ws)) $ + forM_ flt $ \fw -> whenJust (M.lookup fw (W.floating ws)) $ \(W.RationalRect rx ry rw rh) -> do let Rectangle px py pw ph = genericIndex xinesc (W.screen w) tileWindow fw $ Rectangle @@ -250,7 +250,7 @@ rescreen = do setButtonGrab :: Bool -> Window -> X () setButtonGrab grab w = withDisplay $ \d -> io $ if grab - then flip mapM_ [button1, button2, button3] $ \b -> + then forM_ [button1, button2, button3] $ \b -> grabButton d b anyModifier w False buttonPressMask grabModeAsync grabModeSync none none else ungrabButton d anyButton anyModifier w @@ -281,8 +281,8 @@ setFocusX w = withWindowSet $ \ws -> do XConf { display = dpy , normalBorder = nbc, focusedBorder = fbc } <- ask -- clear mouse button grab and border on other windows - (`mapM_` (W.current ws : W.visible ws)) $ \wk -> do - (`mapM_` (W.index (W.view (W.tag (W.workspace wk)) ws))) $ \otherw -> do + forM_ (W.current ws : W.visible ws) $ \wk -> do + forM_ (W.index (W.view (W.tag (W.workspace wk)) ws)) $ \otherw -> do setButtonGrab True otherw io $ setWindowBorder dpy otherw (color_pixel nbc) -- cgit v1.2.3